diff options
Diffstat (limited to 'samba_wizard/Sambashare.pm')
-rwxr-xr-x | samba_wizard/Sambashare.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/samba_wizard/Sambashare.pm b/samba_wizard/Sambashare.pm index 932db9a1..1c43f9a4 100755 --- a/samba_wizard/Sambashare.pm +++ b/samba_wizard/Sambashare.pm @@ -500,7 +500,9 @@ sub create_smbuser { my ($list)= @_; my @users = split(" ", $list); foreach my $user (@users) { - system("smbpasswd -a $user -n"); + if (!any { /^$user:/ } cat_("/etc/samba/smbpasswd") ) { + system("smbpasswd -a $user -n"); + } } } |