[Samba] Adding samba users via a script

jools jools at oss4all.plus.com
Sat Jul 16 00:28:56 GMT 2005


Hi all,

I have a script that I wish to implement for adding users and samba users in 
bulk. I'm running Samba 3.0.13 on Mandriva LE2005 although the script dates 
back to samba 2 days.

The script works by reading the user's name, password and group from a text 
file, first generating Unix user accounts and then running:

/usr/bin/smbpasswd -a -s $user $pwd > /dev/null

to add the smb accounts. The -s switch should allow the Samba password to 
pulled from stdin instead of a prompt but the scipt just exits at the point 
of attempting the creation of the first Samba account . Is there any 
difference between Samba 2 and Samba 3 that would explain this?

Thanks,

Jools


More information about the samba mailing list