I have been trying for hours to get the unix password sync going properly with Samba 1.9.18p4 running on FreeBSD 2.2.5 I have compiled Samba with the ALLOW_CHANGE_PASSWORD option enabled. I created the smbpasswd file as ENCRYPTION.txt states, and can set passwords as root. However, when a user tries changing their password, it doesn't work. The error reported is: /usr/local/samba/bin/smbpasswd: machine 127.0.0.1 rejected the password change: Error was: code -1. The user's unix password is actually changed, but their SMB password isn't. The following password related lines are set in the smb.conf file: unix password sync = True passwd program = /usr/bin/passwd %u passwd chat = *Changing*for* . *New*password* %n\n *password* %n\n *done* The last few lines of the log file (debug level = 100, compiled with DEBUG_PASSWORD enabled) are: pty: opened /dev/ptyp7 Dochild for user grg (uid=0,gid=0) chatbuf=[*Changing*for*] responsebuf=[Changing local password for grg. ] sendbuf=[.] chatbuf=[*New*password*] responsebuf=[New password:] sendbuf=[222222 ] chatbuf=[*password*] responsebuf=[ Retype new password:] sendbuf=[222222 ] chatbuf=[*done*] responsebuf=[ passwd: updating the database... passwd: done] sendbuf=[.] chatbuf=[.] responsebuf=[ passwd: updating the database... passwd: done] Hopefully, someone out there has encountered this same problem, and can tell me what I'm doing wrong. Thanks in Advance Glen Gibb
Glen GIBB wrote:> > I have been trying for hours to get the unix password sync going properly > with Samba 1.9.18p4 running on FreeBSD 2.2.5 > > I have compiled Samba with the ALLOW_CHANGE_PASSWORD option enabled. > I created the smbpasswd file as ENCRYPTION.txt states, and can set > passwords as root. > > However, when a user tries changing their password, it doesn't work. > The error reported is: > /usr/local/samba/bin/smbpasswd: machine 127.0.0.1 rejected the password > change: Error was: code -1. >Hmmm. Well I actually developed and tested the password change code on FreBSD 2.2.5, so I know it works ....... The unix password change code seems to be working correctly for you - what does your log say about the change_oem_password() call that follows the UNIX password change in ipc.c. At a high debug level you should see it scanning the smbpasswd file and re-writing the users smb password by calling mod_smbpwd_entry(). If you don't get any more log after the lines you showed, then your chat script is wrong. Writing chat scripts is *hard* on FreeBSD. It took me a couple of hours to get mine right.... Hope this helps, Jeremy Allison, Samba Team. -- -------------------------------------------------------- Buying an operating system without source is like buying a self-assembly Space Shuttle with no instructions. --------------------------------------------------------
> Glen GIBB wrote: > > > > I have been trying for hours to get the unix password sync going properly > > with Samba 1.9.18p4 running on FreeBSD 2.2.5 > > > > I have compiled Samba with the ALLOW_CHANGE_PASSWORD option enabled. > > I created the smbpasswd file as ENCRYPTION.txt states, and can set > > passwords as root. > >> The unix password change code seems to be working correctly > for you - what does your log say about the change_oem_password() > call that follows the UNIX password change in ipc.c. >Any one got the passwords to sync under Solaris ?. The smbpasswd file changes fine, but siliently the unix password change doesnt happen. unix password sync = yes unix realname = yes passwd program = /bin/passwd %u passwd chat = *New*password* %n\n *new*password* %n\n The Solaris passwd program should ask for the old password when called with a user name as root, so as far as I can see I have the chat correct, but the lack of any error logged from samba at all is most disconcerting.
>Dan Stromberg wrote: >> >> Has anyone done this sort of password synch'ing with NIS? >> > >*Can* root change an NIS password remotely without plaintext >knowledge of the old password ? > >Jeremy.Only on the NIS master can root change a NIS password without knowing the old password. (At least on SunOS that is true, I'm not sure how other OS's implement this) Doug Hughes Engineering Network Services doug@eng.auburn.edu Auburn University
Den 28-Mar-98 13:40:16 skrev Glen GIBB f?lgende om "unix password sync problems!":> I have been trying for hours to get the unix password sync going properly > with Samba 1.9.18p4 running on FreeBSD 2.2.5> I have compiled Samba with the ALLOW_CHANGE_PASSWORD option enabled. > I created the smbpasswd file as ENCRYPTION.txt states, and can set > passwords as root.> However, when a user tries changing their password, it doesn't work. > The error reported is: > /usr/local/samba/bin/smbpasswd: machine 127.0.0.1 rejected the password > change: Error was: code -1.> The user's unix password is actually changed, but their SMB password > isn't.[snip]> Hopefully, someone out there has encountered this same problem, and can > tell me what I'm doing wrong.I'm afraid I can't. We're trying to get it to work on a RedHat 5.0 Linux/i386 system, but we have huge problems making the conversation to work. Initially, we couldn't get the final response to be accepted at all. The final responsebuf would simply be empty every time. We then hacked the code so that it disables the SIGCHILD signal, which helped a lot, but it still only works 3-4 times out of 10. Regards, /????????????????????????????????T???????????????????????????????????????\ | Rask Ingemann Lambertsen | E-mail: mailto:rask@kampsax.k-net.dk | | Registered Phase5 developer | WWW: http://www.gbar.dtu.dk/~c948374/ | | A4000, 775 kkeys/s (RC5-64) | "ThrustMe" on XPilot, ARCnet and IRC | | Hiroshima 45 - Tjernobyl 86 - Windows 95 |