Automatic machine account setup

Christian Hergl weehawk at weehawk.de
Fri Jan 5 04:40:41 GMT 2001


Greetings, people.

I played the last week or so with the new cvs, which finally seem to 
work asa PDC. (though I only played with joining a domain so far...)

Great thanks to all who made that little miracle grow =)

Well, a recent posting gave me the idea, that something is missing in 
the smb.conf of the PDC-How-to of the 2.2.0. It only sets up the passwd 
machine account, and forgets to set the smbpasswd machine account. There 
seem to be some differences with the command "adduser" too.

So I altered the following line of the smb.conf:

"add user script = /usr/sbin/adduser -n -g machines -c Machine -d 
/dev/null -s /bin/false %m$"	

into this:

"add user script = /usr/sbin/useradd -g machines -c NTMachine -d 
/dev/null -s /bin/false %m$ && /usr/local/samba/bin/smbpasswd -a -m %m$"

I verified it on a SuSe7.0 distribution, the command "useradd" works 
there without the -n flag. The group "machine" must exist, or you get 
one of those "Error in remote procedure" thing when you're trying to 
join the domain on the Win2k puter.
I simply suggest to try that command line (without the "add user script 
=" ) manually on the Linux puter first, and then check the passwd and 
smbpasswd files. If the according lines have been added, you can go and 
write it in your smb.conf.

Hope I eased up someone's day,
Christian

PS: About the comment of localized Win2k versions: The german Win2k with 
SP1 works fine with the latest CVS so far.... further testing to go, 
though =)





More information about the samba-ntdom mailing list