Bug 120444

Summary: smbpasswd fails to sync smb and unix password
Product: Red Hat Enterprise Linux 3 Reporter: Matthew Wygant <matthew_wygant>
Component: sambaAssignee: Simo Sorce <ssorce>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: samba-bugs-list
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: 2007-10-19 19:27:45 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:
Attachments:
Description Flags
Attached working smb.conf file none

Description Matthew Wygant 2004-04-08 20:14:07 UTC
Description of problem:
I have set the smb.conf to be able to access the /etc/passwd file to 
update the unix password when the user changes the smb password with 
the smbpasswd tool.  The smb.conf has the following:

#These have been uncommented

  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  unix password sync = Yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %
n\n *passwd
:*all*authentication*tokens*updated*successfully*
  passwd chat debug = yes
  username map = /etc/samba/smbusers


Version-Release number of selected component (if applicable):
samba-3.0.2-6.3E 
samba-common-3.0.2-6.3E
samba-client-3.0.2-6.3E
kernel-2.4.21-9.0.1.EL

How reproducible:

Every Time

Steps to Reproduce:

1. The following have been uncommented in the /etc/samba/smb.conf 
file:

  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd
  unix password sync = Yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %
n\n *passwd
:*all*authentication*tokens*updated*successfully*
  passwd chat debug = yes
  username map = /etc/samba/smbusers

2. I have added a user "user1" and given a password of "user1".   
     useradd user1; passwd user1

3. Start the smb services
     service smb start; chkconfig smb on

4. Add the smb user "user1" with password "user1"
     smbpasswd -a user1

5. Add the user to the /etc/samba/smbusers
     echo "user1 = user1" >> /etc/samba/smbusers

6. Log in as user

7. Change password with smbpasswd
    

  
Actual results:

Old SMB password:
New SMB password:
Retype new SMB password:

Error connecting to 127.0.0.1 (Connection timed out)
unable to connect to SMB server on machine 127.0.0.1. Error was : 
SUCCESS - 0.
Failed to change password for user1

Expected results:

The smbpasswd command should have changed the smb password and the 
unix password.

Additional info:

There is no relevent infomation in the log files, I added the "passwd 
chat debug = yes" option and did not find that it increased logging 
very much.

Comment 1 Wade Mealing 2004-07-20 01:24:02 UTC
Created attachment 102063 [details]
Attached working smb.conf file

Attached smb.conf file with modified password chat, that appears to work on Red
Hat Enterprise Linux AS release 3 (Taroon Update 2). 

Note that error messages returned by smbpasswd are not informative, check
/var/log/messages for more indepth reasons for change failure.

Comment 2 RHEL Program Management 2007-10-19 19:27:45 UTC
This bug is filed against RHEL 3, which is in maintenance phase.
During the maintenance phase, only security errata and select mission
critical bug fixes will be released for enterprise products. Since
this bug does not meet that criteria, it is now being closed.
 
For more information of the RHEL errata support policy, please visit:
http://www.redhat.com/security/updates/errata/
 
If you feel this bug is indeed mission critical, please contact your
support representative. You may be asked to provide detailed
information on how this bug is affecting you.