Bug 230533

Summary: mount.cifs can't handle comma in password
Product: Red Hat Enterprise Linux 5 Reporter: Dominik Fischer <dom_fischer>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED NOTABUG QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: high    
Version: 5.0CC: herrmann, riek
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-26 12:21:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Dominik Fischer 2007-03-01 09:49:56 UTC
Description of problem:
mount.cifs can't handle comma in password 

Version-Release number of selected component (if applicable):
mount.cifs version: 1.10

How reproducible:
Everytime when using comma in password. 

Steps to Reproduce:
1. Change your Windows-Password (or Samba-Password) to somewhat containing a comma 
2. Try to mount a (Windows-)Share
Actual results:
# mount -t cifs //server.example.com/netlogon /mnt
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)

Expected results:
# mount -t cifs //server.example.com/netlogon /mnt

Additional info:

Comment 1 Dominik Fischer 2007-03-01 10:05:46 UTC
Search for "comma" under:

This gives you the following:
if(mountpassword) {
	/* BB add handling for commas in password here */				
	got_password = 1;

Comment 3 Simo Sorce 2007-03-19 21:32:26 UTC
What about using a credentials file instead of putting the password on the mount
command line?
Is there anything preventing you from using a credentials file?
If so what? Maybe that's easy to fix quickly.

(password on command lines are usually bad anyway as they may leak through ps
for example)

Comment 4 Dominik Fischer 2007-03-20 08:46:48 UTC
Since I didn't want the password in the command history I first use the credential
file. After that I tried out passing the password on the command line and last 
I left out the password and entered it after I got prompted for it.
Nothing of that worked with comma in the password.

Does using the credentials file work at your site?

Comment 5 Simo Sorce 2007-03-20 14:30:29 UTC
Work for me on RHEL5.
Command line can;t handle passwords with coma, but the other three mechanisms work:
- credential file
- PASSWD env var
- password prompt

I am inclined to close this bug, can you still reproduce this on RHEL5 GA ?

Comment 6 Dominik Fischer 2007-03-26 08:59:24 UTC
I've verified this in RHEL5 GA: it works like described in the last comment. So
I agree to close this bug for now.