Sergey Proskurnya
2003-Oct-28 17:23 UTC
[Samba] Strange invocation of "DELETE USER SCRIPT"
Hello to all, I have successfully installed Samba as PDC using LDAP. Also I use the Winbindd + libnss_winbind to handle Unix/system accounts and use "wbinfo -c username" to create unix accounts for newly created users. I have the following options in my smb.conf: add user script = /usr/local/sbin/wb_adduser.sh %u delete user script = /usr/local/sbin/wb_deluser.sh %u After some testing with creating and deleting users via MS UserManagerForDomains (I have tried "net rpc user ADD" also), I have discovered that "delete user script" is not invoked. During some dancing with smbd/winbindd I have investigated that SMBD is very "smart": it DOES NOT invoke the "delete user script", if user's account was created using winbindd and stored in LDAP also. In this case SMBD calls/uses directly WINBINDD to delete the user account. Such intelligent behaviour may be good for some reason, but not in this case: in my "delete user script" I want to do some extra stuff, not just user removing. Could you please advice to me some workaround for this problem? And of cause, such behaviour must be documented (I haven't found any words about this in smb.conf(5) and Samba-HOWTO-Collection.html). Thanks, Sergey Proskurnya.