/sbin/mount.smb uses USER variable which is set even when user option not used (since it is the shell variable for the current user). This causes mounting smbfs filesystems without a user to fail since "root" is put on the command line to smbmount, instead of no user. Also, since USER should be in the form of "-U user", smbmount is being told to make root the password. The patch below changes USER to SMBUSER. --- old/mount.smb Sat Jun 5 15:17:28 1999 +++ new/mount.smb Sat Jun 5 15:17:07 1999 @@ -28,7 +28,7 @@ COMMAND="$COMMAND -u$MUID" ;; user=*) - USER="-U `echo $arg | cut -d '=' -f 2-`" + SMBUSER="-U `echo $arg | cut -d '=' -f 2-`" ;; passwd=*) PASSWD=`echo $arg | cut -d '=' -f 2-` @@ -39,7 +39,7 @@ done if [ -n "$PASSWD" ]; then - exec smbmount "$1" $USER $PASSWD -c "$COMMAND" + exec smbmount "$1" $SMBUSER $PASSWD -c "$COMMAND" else - exec smbmount "$1" -N $USER -c "$COMMAND" + exec smbmount "$1" -N $SMBUSER -c "$COMMAND" fi
fixed in the next samba release (2.0.4b-4, or greater.)