[Samba] prevent "delete user script" to delete special Samba user

Cleber P. de Souza cleberps at gmail.com
Wed Jan 3 13:46:18 GMT 2007

You can put a if test using script.
Similar to:
delete user script = path/to/script/script.sh "%U"
Into script.sh

if [ $1 -ne "myuser" ];
then delete_user;

This is preventing Samba from deleting Samba myuser user.
I haven't check this script. Check by yourself in a test environment first.

On 1/3/07, Niels Peuyn <peuyn at npy.oberon.net> wrote:
> Hello,
> OS: FreeBSD 6.1
> Samba: 3.0.23c
> What kind of exit code do the "delete user script" need, to
> prevent Samba from deleting a user in tdbsam database?
> I'm testing Windows "User Manager for Domain" (usrmgr.exe) and
> I'm trying to convince Samba to NOT delete special users like
> "administrator" etc.
> Whenever I delete such a user within User Manager for Domain
> the unix user is still in passwd, but the Samba user has been
> deleted.
> Thanks in advance
> Niels
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/listinfo/samba

Cleber P. de Souza

More information about the samba mailing list