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

Niels Peuyn peuyn at npy.oberon.net
Wed Jan 3 14:07:42 GMT 2007


Hello Cleber,

thanks for you reply.

> You can put a if test using script.
> Similar to:
> delete user script = path/to/script/script.sh "%U"
> Into script.sh
> 
> #!/bin/bash
> if [ $1 -ne "myuser" ];
> then delete_user;
> fi
> 
> This is preventing Samba from deleting Samba myuser user.
> I haven't check this script. Check by yourself in a test environment first.
> 

this will prevent Samba from deleting the Unix user, but this is not
my problem. My script is doing this in a correct way.

Thank you very much
Niels



More information about the samba mailing list