Bug 112528

Summary: changing password to one that has ; doesn't work
Product: [Retired] Red Hat Linux Reporter: Paul Warner <pw277>
Component: redhat-config-sambaAssignee: Brent Fox <bfox>
Status: CLOSED RAWHIDE QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 9CC: forresttaylor2000, mitr, reubendb
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-01-12 21:54:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Warner 2003-12-22 11:24:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)

Description of problem:
I entered a new password that had a semi-colon (;) in the middle, and 
the app took the password only up to the semi-colon, treating the 
rest as a "command".  I only spotted the error message by chance in 
the terminal window when quitting.  There was no other indication 
that this was what was happening.  I then went to smbpasswd on the 
command line, and it worked fine with the semi-colon.


Version-Release number of selected component (if applicable):
redhat-config-samba-1.0.4-1

How reproducible:
Always

Steps to Reproduce:
1.Preferences -> Samba Users -> Edit User
2.Enter a password with a semi-colon (;) in the middle of it somewhere
3.verify that the password as entered is only up to the semi-colon
    

Actual Results:  I could not login with my full password.  I noticed 
an error in the terminal from which I started redhat-config-samba 
saying that it didn't recognize the command "last_part_of_my_password"

Expected Results:  It should be capable of accepting passwords with 
semi-colons in them, as passwd and smbpasswd do.

Additional info:

Comment 1 Brent Fox 2004-01-12 21:53:32 UTC
*** Bug 113199 has been marked as a duplicate of this bug. ***

Comment 2 Brent Fox 2004-01-12 21:54:22 UTC
Should be fixed in system-config-samba-1.2.2-1 in Rawhide.  Thanks for
your report.

Comment 3 Miloslav Trmac 2004-01-13 09:04:54 UTC
> os.system('/usr/bin/smbpasswd -a -s %s "%s"' %(unix_name, password))
This won't work if the password contains for example
";any command
Replacing the "%s" by '%s' (+ python quoting) won't help against
';any command
using os.exec* should avoid these issues.

BUT in any of these cases the password can be seen using (ps).
The password should be passed to smbpasswd via a pipe (os.popen*)
instead of the command line.

Comment 4 Brent Fox 2004-06-23 22:05:59 UTC
system-config-samba-1.2.12-1 will use os.popen instead of os.system.

Comment 5 Brent Fox 2004-06-23 22:06:27 UTC
*** Bug 120151 has been marked as a duplicate of this bug. ***