[Samba] add machine account with sudo instead of root account

Glenn Arnold garnold at unrealsolutions.com
Sat Aug 9 02:39:46 GMT 2003


Is this possible to add machine account from several different tech user
accounts.  What I have been reading on the Internet sounds like it is
possible.  In my smb.conf file I tried to do it like this.
 
add user script = /usr/bin/sudo /usr/sbin/useradd -d /dev/null -g ntmach
-c 'Machine Account' -s /bin/false -M %u
 
The reason I want to do this I use sysprep to automate the installation
of w2k computers to add the machine account into the domain without user
assistance.  The main reason to do this is the text file that sysprep
uses does not encrypt the user account password for adding the machine
account to the domain in the sysprep config file.  So, I would  like to
setup an account to just have rights to add computer accounts and
nothing else which sounds like sudo can do this.  I am I right?  I
believe I got sudo configured right, because I can use it to do things
with my user account that normally can't do without sudo.
 
Any help would be appreciate!
Thanks
-Glenn



More information about the samba mailing list