smbpassword modification & logon scripts

scode at scode at
Sun Aug 29 15:04:43 GMT 1999


I've got two questions for which I haven't been able to find an answer after
searching the web and the list archives.

* Is it in any way possible to, from a per-user logon script, find out if
the user belongs to a specific Unix group? I guess this would get pretty
tricky, but is it possible at all?

* I need to create a script/program that removes a user from a Unix system.
The removal has to include the entries in /etc/smbpasswd and /etc/smbusers[1].
First of all, is there a utility out there already that does this? If not,
how do I lock the file so to prevent samba from reading it while I'm
modifying it? Which locking mechanism does samba use?

[1] If I remove a Unix user, but leave the samba entry behind, problems will
arise if one later creates a new user by the same name. smbpasswd (the
executable) will then refuse to change the password of the user.


/ Peter Schuller

PGP userID: 0x5584BD98 or 'Peter Schuller <scode at>'
Key retrival: Send an E-Mail to scode-getpgpkey at
E-Mail: scode at Web:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 248 bytes
Desc: not available
Url :

More information about the samba mailing list