Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have setup a work server using Ubuntu 12.04 and am trying to get my Win-7 PC to connect to the new domain. I have created multiple users in LDAP and assigned them to the groups "domainadmins" and "domainusers".

When I try to connect to the server with the username I receive the following error:

I looked up this error and found that this can be fixed by entering the below command:

sudo net sam rights grant <user> SeMachineAccountPrivilege

When I enter this into the terminal I receive the following message:

Could not find name <user>

I installed LAM so I could see the users on a GUI and they are setup.

Additional Information

I'm not sure if this is all related but I thought it would help

LDAP Account Manager:

There are users and groups setup but there is no "Hosts" or "Samba Domains"

When adding a user through LAM I go to the Samba 3 tab and click "Add Samba 3 Extension" but it errors saying "No Samba 3 domains found in LDAP. Please create one first" Unforunately I can't create one because I can't fetch the Local SID (see below for error).

Schema Test in LAM


Samba 3 The object class sambaSamAccount is not supported by your LDAP server.


Samba 3 The object class sambaGroupMapping is not supported by your LDAP server.


Samba 3 The object class sambaSamAccount is not supported by your LDAP server.

Samba Domains

Samba domain The object class sambaDomain is not supported by your LDAP server.

Samba Client Information

From command

smbclient -L ubb01
Domain=[EXAMPLE.COM] OS=[Unix] Server=[Samba 3.6.3]

    Sharename       Type      Comment
    ---------       ----      -------
    netlogon        Disk      Network Logon Service
    print$          Disk      Printer Drivers
    IPC$            IPC       IPC Service (ubb01 server (Samba, Ubuntu))
    chiserver       Disk      Home Directories
Domain=[EXAMPLE.COM] OS=[Unix] Server=[Samba 3.6.3]

    Server               Comment
    ---------            -------
    UBB01                ubb01 server (Samba, Ubuntu)

    Workgroup            Master
    ---------            -------
    CHISERVER.COM        UBB01
    WORKGROUP            CHIHEADS-101

(Domain names aren't actually set as "EXAMPLE.COM")

chiserver@ubb01:~$ testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[netlogon]"
WARNING: The "share modes" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_DOMAIN_PDC
Press enter to see a dump of your service definitions

    workgroup = EXAMPLE.COM
    realm = EXAMPLE.COM
    server string = %h server (Samba, Ubuntu)
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    unix password sync = Yes
    client NTLMv2 auth = No
    client lanman auth = Yes
    kerberos method = system keytab
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    add machine script = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u
    logon script = logon.cmd
    logon path = \\%N\%U\windowsprofile
    logon drive = H:
    domain logons = Yes
    dns proxy = No
    usershare allow guests = Yes
    panic action = /usr/share/samba/panic-action %d
    idmap config * : backend = tdb

    comment = Home Directories
    valid users = %S
    read only = No
    browseable = No

    comment = Network Logon Service
    path = /home/samba/netlogon
    guest ok = Yes
    share modes = No

    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    print ok = Yes
    browseable = No

    comment = Printer Drivers
    path = /var/lib/samba/printers

Can't get Local SID

While trying to retrieve the localsid I receive an error:

net getlocalsid
Failed to open /var/lib/samba/secrets.tdb
Unable to open secrets.tdb.  Can't fetch domain SID for name: UBB01

Users not showing at Login

I only have 1 user showing at the login screen of Ubuntu (the user setup during installation). I presume this is because it looks like the other users are only setup in LDAP.

When trying to login from Win-7 with the original user I receive a different error message... (this user I was able to give SeMachineAccountPrivilege)

The specified computer account could not be found. Contact an administrator to verify the account is in the domain. If the account has been deleted unjoin, reboot and rejoin the domain.

Guide to setup server

I have been following this guide to setup this box.

Note: I haven't completed the section in Step 8 to recognise Unix Admins as Windows Admins as I am also having issues with this...

sudo net groupmap add ntgroup="Domain Admins" unixgroup=domainadmins rid=512 type=d

So how to solve this issue?

share|improve this question
If I'm not asking the right questions or not giving the correct information please let me know. This has been an issue for a couple days now and I'm stumped with what I need to do – Bkcol Nov 26 '13 at 2:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.