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 Password: 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: ./.
Search for "comma" under: http://samba.osmirror.nl/samba/ftp/cifs-cvs/mount.cifs.c This gives you the following: (...) if(mountpassword) { /* BB add handling for commas in password here */ strncpy(mountpassword,temp_val,length); got_password = 1; } (...)
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)
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?
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 ?
I've verified this in RHEL5 GA: it works like described in the last comment. So I agree to close this bug for now.