Red Hat Bugzilla – Bug 113199
redhat-config-samba cuts passwords short if they contain special characters
Last modified: 2007-11-30 17:10:35 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Description of problem:
redhat-config-samba cuts passwords short if they contain special
characters (e.g., &*><, etc.). Looking at the source, I see that
smbpasswd is called like this:
os.system('/usr/bin/smbpasswd -a -s %s %s' %(unix_name, password))
Running this from the command-line with a password of Hello&GoodBye
# smbpasswd -a -s username Hello&GoodBye
bash: GoodBye: command not found
Obviously it expands the &. Simple quotes fix it:
# smbpasswd -a -s username 'Hello&GoodBye'
Thus the os.system call needs to be changed:
os.system("/usr/bin/smbpasswd -a -s %s '%s'" %(unix_name, password))
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Run redhat-config-passwd and try using a password with special
Actual Results: Trying to mount an SMB share using that password will
not work because the command interprets the special characters.
Created attachment 96862 [details]
Put quotes around the password when calling smbpasswd.
*** This bug has been marked as a duplicate of 112528 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.