[Samba] "Add user script" option never running?

Andrew Furey andrew at terminus.net.au
Wed Nov 20 09:13:00 GMT 2002


Hi all,

I'm using the latest alpha version (the one that comes with Debian 
unstable) in domain mode, setting up a member file server, with domain 
clients authenticating to a W2k machine.

I'm trying to use the "add user script" option to create new users 
automagically, but it never seems to run. The script in this case is a 
handwritten perl script, and I've added a "touch" call at the top, so I 
can tell whether it's really running or not.

Here's the [global] part of smb.conf:

[global]
encrypt passwords=yes
workgroup=BEDROCK
security=domain
password server=*
netbios name=newbambam
add user script = /usr/local/bin/adduser.pl %u
delete user script=/usr/sbin/userdel -r
add user to group script=/usr/sbin/adduser %u %g
username map=/etc/samba/user.map
logon path=%LUser Profiles%U
load printers=no


I don't know about the other "script" options, but the add user one 
never runs. If I turn on "log level=2", I get the following (relevant) 
lines in log.smbd:

[no entry for this user on the local system at all]
   check_password:  Authentication for user [Andrew Furey] -> [Andrew 
Furey] FAILED with error NT_STATUS_NO_SUCH_USER

[an entry in user.map, mapping to a not-yet-existent system user]
   check_password:  Authentication for user [Andrew Furey] -> [andrewfu] 
FAILED with error NT_STATUS_NO_SUCH_USER

[a system user also created]
   check_password:  authentication for user [Andrew Furey] -> [andrewfu] 
-> [andrewfu] suceeded


As you can see, it all seems to work when the user is actually there, 
but if they're not present, it simply gives up rather than running the 
script.

Any ideas?

TIA
Andrew

-- 
ANDREW FUREY <andrew at terminus.net.au> - Sysadmin/developer for Terminus.
Providing online networks of Australian lawyers (http://www.ilaw.com.au)
and Linux experts (http://www.linuxconsultants.com.au) for instant help!
Disclaimer: http://www.terminus.net.au/disclaimer.html. GCS L+++ P++ t++




More information about the samba mailing list