Bug 113199 - redhat-config-samba cuts passwords short if they contain special characters
redhat-config-samba cuts passwords short if they contain special characters
Status: CLOSED DUPLICATE of bug 112528
Product: Fedora
Classification: Fedora
Component: redhat-config-samba (Show other bugs)
1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Brent Fox
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-01-09 12:28 EST by Forrest
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 14:00:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Put quotes around the password when calling smbpasswd. (927 bytes, patch)
2004-01-09 12:30 EST, Forrest
no flags Details | Diff

  None (edit)
Description Forrest 2004-01-09 12:28:34 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031030

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
yields:

# smbpasswd -a -s username Hello&GoodBye
[1] 26495
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):
redhat-config-samba-1.1.4-1

How reproducible:
Always

Steps to Reproduce:
1.  Run redhat-config-passwd and try using a password with special
bash characters.

Actual Results:  Trying to mount an SMB share using that password will
not work because the command interprets the special characters.
Comment 1 Forrest 2004-01-09 12:30:02 EST
Created attachment 96862 [details]
Put quotes around the password when calling smbpasswd.
Comment 2 Brent Fox 2004-01-12 16:53:29 EST

*** This bug has been marked as a duplicate of 112528 ***
Comment 3 Red Hat Bugzilla 2006-02-21 14:00:41 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.