Bug 3239

Summary: /sbin/mount.smb handles user and passwd options wrongly
Product: [Retired] Red Hat Linux Reporter: tpr
Component: distributionAssignee: David Lawrence <dkl>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: jar
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-06-14 17:32:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description tpr 1999-06-03 14:50:13 UTC
Mounting an smbfs filesystem from /etc/fstab, if you use the
user=wibble,passwd=hatstand options, the /sbin/mount.smb
script gets the smbmount command line wrong, putting the
-U wibble before the hatstand. Patch is:

--- /sbin/mount.smb.orig        Thu Jun  3 11:56:23 1999
+++ /sbin/mount.smb     Thu Jun  3 11:56:40 1999
@@ -39,7 +39,7 @@
 done

 if [ -n "$PASSWD" ]; then
-      exec smbmount "$1" $USER $PASSWD -c "$COMMAND"
+      exec smbmount "$1" $PASSWD $USER -c "$COMMAND"
 else
       exec smbmount "$1" -N $USER -c "$COMMAND"
 fi

Comment 1 Bill Nottingham 1999-06-14 17:32:59 UTC
fixed in latest samba release (2.0.4b-4, or so)

Comment 2 Bill Nottingham 1999-09-08 14:29:59 UTC
*** Bug 4973 has been marked as a duplicate of this bug. ***

/sbin/mount.smb places the password in the wrong place
causing the smbmount to fail.

Replace:
    exec smbmount "$1" $USER $PASSWORD -c "$COMMAND"
with
    exec smbmount "$1" $PASSWD $USER -c "$COMMAND"

thanks,
john