LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-12-2006, 09:48 AM   #1
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Rep: Reputation: 30
Question SAMBA: C an't create a machine account for domain


Hi all,

I am building a primary domain controller on a network that doesn't currently have one using Samba on FC5. I am trying to following command to make a machine account, but it doesn't seem to work right. I creates the account as a user. According to what I have been reading it should create an entry in the /etc/passwd file with the username$ instead I create username with no $.

Here's my smb.conf:
[global]
workgroup = TODAROS
netbios name = DC1.TODAROS.COM
log file = /var/log/samba/%m.log
max log size = 50
time server = Yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
add user script = /usr/sbin/useradd -d /dev/null -g 100 -s /bin/false -M %u
logon script = logon.bat
logon path = \\%L\profiles\%u\%m
logon drive = H:
logon home = \\%L\%u\.win_profile\%m
domain logons = Yes
os level = 65
preferred master = Yes
domain master = Yes
dns proxy = No
wins support = Yes
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

[netlogon]
comment = Network Logon Service
path = /home/netlogon
browseable = No

[Profiles]
path = /home/profiles
read only = No
create mask = 0600
directory mask = 0700
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

Here's the string I use to create users:
useradd -d /dev/null -g 100 -s /bin/false -M test

Here's my result from /etc/passwd
test:!!:13311:0:99999:7::

Any input would be greatly appreciated.

Thanks..
 
Old 06-12-2006, 12:26 PM   #2
uteck
Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Sidux, LinHES, and Mythbuntu
Posts: 209

Rep: Reputation: 32
You may also need to create a samba password with smbpasswd.
 
Old 06-12-2006, 12:42 PM   #3
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
Uteck, Thanks. I will try that as well.

I noticed that the passwd in /etc has :!!: in the second field which means it's disabled. This is what a machine account looks like, but the ending $ is not present.
 
Old 06-14-2006, 08:04 AM   #4
lucktsm
Member
 
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
I found this from samba.org and it fixed the problem.

“$” Cannot Be Included in Machine Name

A machine account, typically stored in /etc/passwd, takes the form of the machine name with a “$” appended. Some BSD systems will not create a user with a “$” in the name. Recent versions of FreeBSD have removed this limitation, but older releases are still in common use.

The problem is only in the program used to make the entry. Once made, it works perfectly. Create a user without the “$”. Then use vipw to edit the entry, adding the “$”. Or create the whole entry with vipw if you like; make sure you use a unique user login ID.
Note

The machine account must have the exact name that the workstation has.
Note

The UNIX tool vipw is a common tool for directly editing the /etc/passwd file. The use of vipw will ensure that shadow files (where used) will remain current with the passwd file. This is important for security reasons.
 
  


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
samba and kerberos (create a computer account in Win2k AD) shane200_ Linux - Networking 0 01-04-2005 09:27 AM
Am having problems creating a machine account from XP WS to Samba 3 Domain Controller robertomason Linux - Wireless Networking 3 03-13-2004 04:37 PM
Why can I not add a machine account to my Samba 3.0 robertomason LinuxQuestions.org Member Success Stories 1 02-14-2004 12:12 PM
Adding Machine to domain with Samba 3 fails bedwardj Linux - Networking 6 12-16-2003 08:23 PM
Joining a machine from another domain to my linux samba domain acummins Linux - Networking 0 09-13-2003 07:07 AM


All times are GMT -5. The time now is 07:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration