diff options
author | Jonas Smedegaard <dr@jones.dk> | 2004-09-25 21:00:06 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2004-09-25 21:00:06 +0000 |
commit | ab77062a1b77d84e1dcb8120457c2ac447133365 (patch) | |
tree | 165f85b3552c98381e59c13e6d898611d9471269 /adduser.local | |
parent | 375409008e8c84e7e81b781de09fd3e20783fd02 (diff) |
Make samba password optional.
Diffstat (limited to 'adduser.local')
-rwxr-xr-x | adduser.local | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/adduser.local b/adduser.local index b1ba004..595d0f2 100755 --- a/adduser.local +++ b/adduser.local @@ -3,7 +3,7 @@ # /usr/local/sbin/adduser.local # Copyright 2001-2002 Jonas Smedegaard <dr@jones.dk> # -# $Id: adduser.local,v 1.16 2004-05-13 13:05:56 jonas Exp $ +# $Id: adduser.local,v 1.17 2004-09-25 21:00:06 jonas Exp $ # # Common adduser additions for Spiff and Xenux networks # @@ -28,10 +28,18 @@ NEWHOMEDIR=$4 # Samba password #FIXME: Check if enabled in samba.conf (or included files!) -if [ -x /usr/bin/pdbedit ]; then - /usr/bin/pdbedit -a -u "$NEWUSERNAME" -elif [ -x /usr/bin/smbpasswd -a -f /etc/samba/smbpasswd ]; then - /usr/bin/smbpasswd -a $NEWUSERNAME +if [ -x /usr/bin/pdbedit ] || [ -x /usr/bin/smbpasswd ]; then + echo -n "Add samba access to the account (y/N)? " + read sambaaccount + case $sambaaccount in + y|Y) + if [ -x /usr/bin/pdbedit ]; then + /usr/bin/pdbedit -a -u "$NEWUSERNAME" + elif [ -x /usr/bin/smbpasswd ] && [ -f /etc/samba/smbpasswd ]; then + /usr/bin/smbpasswd -a $NEWUSERNAME + fi + ;; + esac fi # Mail forwarding |