Bug 113199 - redhat-config-samba cuts passwords short if they contain special characters
Summary: redhat-config-samba cuts passwords short if they contain special characters
Keywords:
Status: CLOSED DUPLICATE of bug 112528
Alias: None
Product: Fedora
Classification: Fedora
Component: redhat-config-samba
Version: 1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brent Fox
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-01-09 17:28 UTC by Forrest
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 19:00:41 UTC
Type: ---
Embargoed:


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

Description Forrest 2004-01-09 17:28:34 UTC
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 17:30:02 UTC
Created attachment 96862 [details]
Put quotes around the password when calling smbpasswd.

Comment 2 Brent Fox 2004-01-12 21:53:29 UTC

*** This bug has been marked as a duplicate of 112528 ***

Comment 3 Red Hat Bugzilla 2006-02-21 19:00:41 UTC
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.