LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-15-2010, 05:14 PM   #1
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Rep: Reputation: 15
New Samba Server Cannot add Windoz machines to domain


I've been fighting with the Samba server for a while and I'm a bit frustrated at this point...when I try to add machines to my domain I get the "The username could not be found error" here is my smb.conf...
Code:
[global]
    workgroup = INMANONE
    netbios name = PDC
    server string = Inman Domain Controller

    os level = 64
    security = user
    passdb backend = tdbsam
    domain logons = yes
    domain master = yes
    local master = yes

    logon path = \\%L\profiles\%U
    logon script = logon.bat
   # logon drive = H:
    admin users = administrator @smbadmins
    encrypt passwords = true
   # obey pam restrictions = yes
   # pam password change = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

    add user script = /usr/sbin/useradd -m '%u' -g smbusers -G smbusers
    delete user script = /usr/sbin/userdel -r '%u'
    add group script = /usr/sbin/groupadd '%g'
    delete group script = /usr/sbin/groupdel '%g'
    add user to group script = /usr/sbin/usermod -G '%g' '%u'
    add machine script = /usr/sbin/useradd -s /bin/false -d /nonexistent '%u' -g smbmachines

    guest account = nobody

    syslog = 0
    log file = /var/log/samba/samba.log
    max log size = 1000

    wins support = yes
    dns proxy = no
    time server = yes

    show add printer wizard = yes
    printing = cups
    printcap name = cups

    socket options = TCP_NODELAY
    panic action = /usr/share/samba/panic-action %d

[netlogon]
    comment = Network Logon Service
    path = /srv/storage/netlogon
    read only = yes
    valid users = @smbadmins @smbusers

[profiles]
    comment = Roaming Profile Share
    path = /srv/storage/profiles
    browseable = no
Here are my samba users:
Code:
Unix username:        root
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-3807425710-803335164-4091565746-1000
Primary Group SID:    S-1-5-21-3807425710-803335164-4091565746-513
Full Name:            root
Home Directory:       \\pdc\root
HomeDir Drive:
Logon Script:         logon.bat
Profile Path:         \\pdc\profiles\root
Domain:               INMANONE
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          never
Kickoff time:         never
Password last set:    Mon, 15 Mar 2010 00:59:30 PST
Password can change:  Mon, 15 Mar 2010 00:59:30 PST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
---------------
Unix username:        pmalbrough
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-3807425710-803335164-4091565746-2000
Primary Group SID:    S-1-5-21-3807425710-803335164-4091565746-513
Full Name:            Pierre-Andre Malbrough
Home Directory:       \\pdc\pmalbrough
HomeDir Drive:
Logon Script:         logon.bat
Profile Path:         \\pdc\profiles\pmalbrough
Domain:               LDAP
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          never
Kickoff time:         never
Password last set:    Mon, 15 Mar 2010 00:21:01 PST
Password can change:  Mon, 15 Mar 2010 00:21:01 PST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
---------------
Unix username:        administrator
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-3807425710-803335164-4091565746-2006
Primary Group SID:    S-1-5-21-3807425710-803335164-4091565746-513
Full Name:
Home Directory:       \\pdc\administrator
HomeDir Drive:
Logon Script:         logon.bat
Profile Path:         \\pdc\profiles\administrator
Domain:               INMANONE
Can anyone help??!!
 
Old 03-17-2010, 06:36 PM   #2
OdinnBurkni
Member
 
Registered: Feb 2007
Location: Iceland
Distribution: Fedora 14, CentOS, FreeNAS
Posts: 126

Rep: Reputation: 20
Samba problem

Hi there.
It might not be your problem but when adding machines to a domain you usually need a user with domain admin rights. After the PC is joined regular user can log on to it.
 
Old 03-18-2010, 12:41 AM   #3
ifeatu
Member
 
Registered: Sep 2008
Distribution: Fedora 9
Posts: 68

Original Poster
Rep: Reputation: 15
Adding Admins

I have tried adding my name (pmalbrough) to the admin users field in the smb.conf file but I still get a bad password error in windows when I try to add the computer to the domain. I added the user using smbuser -a and useradd and nothing seems to help, I tried resetting the password on both accounts as well to no avail...I could use some advise thanks@
 
Old 03-18-2010, 01:03 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 616

Rep: Reputation: 64
Quote:
Originally Posted by ifeatu View Post
I've been fighting with the Samba server for a while and I'm a bit frustrated at this point...when I try to add machines to my domain I get the "The username could not be found error" here is my smb.conf...
Code:
[global]
    workgroup = INMANONE
    netbios name = PDC
    server string = Inman Domain Controller

    os level = 64
    security = user
    passdb backend = tdbsam
    domain logons = yes
    domain master = yes
    local master = yes

    logon path = \\%L\profiles\%U
    logon script = logon.bat
   # logon drive = H:
    admin users = administrator @smbadmins
    encrypt passwords = true
   # obey pam restrictions = yes
   # pam password change = yes
    unix password sync = yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

    add user script = /usr/sbin/useradd -m '%u' -g smbusers -G smbusers
    delete user script = /usr/sbin/userdel -r '%u'
    add group script = /usr/sbin/groupadd '%g'
    delete group script = /usr/sbin/groupdel '%g'
    add user to group script = /usr/sbin/usermod -G '%g' '%u'
    add machine script = /usr/sbin/useradd -s /bin/false -d /nonexistent '%u' -g smbmachines

    guest account = nobody

    syslog = 0
    log file = /var/log/samba/samba.log
    max log size = 1000

    wins support = yes
    dns proxy = no
    time server = yes

    show add printer wizard = yes
    printing = cups
    printcap name = cups

    socket options = TCP_NODELAY
    panic action = /usr/share/samba/panic-action %d

[netlogon]
    comment = Network Logon Service
    path = /srv/storage/netlogon
    read only = yes
    valid users = @smbadmins @smbusers

[profiles]
    comment = Roaming Profile Share
    path = /srv/storage/profiles
    browseable = no
Here are my samba users:
Code:
Unix username:        root
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-3807425710-803335164-4091565746-1000
Primary Group SID:    S-1-5-21-3807425710-803335164-4091565746-513
Full Name:            root
Home Directory:       \\pdc\root
HomeDir Drive:
Logon Script:         logon.bat
Profile Path:         \\pdc\profiles\root
Domain:               INMANONE
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          never
Kickoff time:         never
Password last set:    Mon, 15 Mar 2010 00:59:30 PST
Password can change:  Mon, 15 Mar 2010 00:59:30 PST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
---------------
Unix username:        pmalbrough
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-3807425710-803335164-4091565746-2000
Primary Group SID:    S-1-5-21-3807425710-803335164-4091565746-513
Full Name:            Pierre-Andre Malbrough
Home Directory:       \\pdc\pmalbrough
HomeDir Drive:
Logon Script:         logon.bat
Profile Path:         \\pdc\profiles\pmalbrough
Domain:               LDAP
Account desc:
Workstations:
Munged dial:
Logon time:           0
Logoff time:          never
Kickoff time:         never
Password last set:    Mon, 15 Mar 2010 00:21:01 PST
Password can change:  Mon, 15 Mar 2010 00:21:01 PST
Password must change: never
Last bad password   : 0
Bad password count  : 0
Logon hours         : FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
---------------
Unix username:        administrator
NT username:
Account Flags:        [U          ]
User SID:             S-1-5-21-3807425710-803335164-4091565746-2006
Primary Group SID:    S-1-5-21-3807425710-803335164-4091565746-513
Full Name:
Home Directory:       \\pdc\administrator
HomeDir Drive:
Logon Script:         logon.bat
Profile Path:         \\pdc\profiles\administrator
Domain:               INMANONE
Can anyone help??!!
First of all, make sure the workgroup name you specified which is workgroup = INMANONE is same with the windows systems. Then edit these lines in the following manner:

Quote:
[netlogon]
comment = Network Logon Service
path = /srv/storage/netlogon
read only = yes
public = no
browseable = yes
valid users = smbadmins smbusers
save and exit, restart the SAMBA.

Make sure you have the users smbadmins and smbusers in your system.
Provide smbpasswd for them:

Quote:
#smbpasswd -a smbadmins
#smbpasswd -a smbusers
Now try to access the shares:
#smbclient //ip_address_of_samba_server/netlogon -U smbadmins

Last edited by Sayan Acharjee; 03-18-2010 at 01:05 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using samba as a PDC, can't get on domain from XP Pro machines..... Exutable Linux - Server 7 07-14-2008 10:33 PM
how to add a linux machine to samba server domain which is running on a different PC? shishirkotkar Linux - Newbie 0 05-04-2008 11:28 AM
cant add win2000 server to samba ldap domain procfs General 3 08-14-2006 02:16 AM
samba: acl's for machines outside the domain Clemente Linux - Software 0 06-20-2004 07:21 AM
automatic adding machines to domain in samba brasuca Linux - Networking 1 05-14-2004 08:09 AM


All times are GMT -5. The time now is 04:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration