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

Andrew Bartlett abartlet at samba.org
Fri Nov 22 04:53:00 GMT 2002


On Wed, 2002-11-20 at 20:12, Andrew Furey wrote:
> 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?

I just looked at the codepath - and it looks like it just got completely
lost during recent development.  Indeed, the code will just never run.

Now, this might just be my cunning plan - I'm not a big fan of the 'add
user script' thing, but I'll see if I can re-implement this in a way
that makes sense.

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba/attachments/20021122/713faf07/attachment.bin


More information about the samba mailing list