[Samba] question "add user script"

murrah boswell otrcomm at isp-systems.net
Sat May 9 03:02:24 GMT 2009

Hello all,

I have never had the need to use the "add user script" functionality but now I do. However, it does not seem to be working. My 
smb.conf entry is like so:

add user script = /remote/configure_scripts/addusers.sh

where addusers.sh is a bash script that reads in a text file of usernames, groups, and passwords and adds the users to /etc/passwd, 
/etc/group/ and /etc/samba/smbpasswd. The addusers.sh works fine from the command line but samba doesn't appear to call it.

I see that checks for "add user script" and "add machine script" are in the source code, so did I miss an option when I compiled 
samba or what else is it that I am missing to get the script to trigger?

Also while I am on the subject of the "add user script," would it be possible to pass the username and password from samba to a 
shell script? In other words, could I have something like

add user script = /remote/configure_scripts/addusers.sh %u %p

where %p is whatever samba holds the password variable in?

But first things first, how can I get the "add user script" functionality to work?

Murrah Boswell

More information about the samba mailing list