[Samba] Problems syncing smbpasswd/passwd

Gary Dale garydale at torfree.net
Tue Aug 15 12:02:26 GMT 2006

Bernd Pörner wrote:
> Dear all!
> Since several days I'm trying to get Samba's unix password sync to work
> for me, but I still have problems. I'm using the Samba 3.0.22 binaries
> that come with Ubuntu 6.06 and this is the [global] section of my 
> smb.conf:
> [global]
> workgroup = TEST
> domain logons = yes
> preferred master = yes
> wins support = yes
> username map = /etc/samba/smbusers
> syslog = 100
> add machine script = /usr/sbin/useradd -s /bin/false -d 
> /var/lib/nobody '%u'
> logon path = \\%L\profiles\%U
> unix password sync = yes
> passwd program = /usr/bin/passwd %u
> passwd chat = *Enter\snew\sUNIX\spassword:* %n\n
> *Retype\snew\sUNIX\spassword:* %n\n
> When I'm logged on to my WinXP workstation and try to change my SMB
> password, Windows hangs, doesn't respond anymore. Im my log.smbd I get
> the following message:
> [2006/07/24 13:03:55, 0] lib/debug.c:reopen_logs(597)
> Unable to open new log file /var/log/samba/log.smbd: Permission denied
> Any idea how to solve this problem?
> Cheers
> Bernd

I had the same problem myself. Your "passwd chat" entry likely doesn't 
match what your Samba box is looking for. The first part looks OK, but 
I'd end it with "*success*". Without that, you don't get the response. 
You also could shorten the entry to something like:

passwd chat = *Enter*password* %n\n *Retype*password* %n\n *success*

The password chat uses "expect" so the "*" is any sequence of 
characters. As long as it sees something it can match without giving a 
false positive, things should work.

More information about the samba mailing list