Hi all, I'm using 2.2.3 on FreeBSD 4.5 RELEASE and trying to get 'smbpasswd' to change the encrypted password and the UNIX password (/etc/passwd). I'm getting strange behaviour. Having worked through debugging my 'chat script', I now have the following situation:- When unix password sync = yes smbpasswd works, but only the UNIX password is changed When unix password sync = no smbpasswd works, and only the encrypted password is changed. Moreover, in the first case, smbpasswd takes (at least) 22 seconds to return the prompt, but in the second, only 2-3 seconds. I'm no expert, but I noticed in the source code an 'alarm(20)' which is to kill the passwd-chat child if it runs too long (I guess). This makes me wonder if the child's not returning successfully, even though it has changed the UNIX password. Any clues? Any one got 'unix passwd sync' working in 2.2.3a ? Could it be a 'passwd chat' issue? Mine is currently:- *new*password %n\n *new*password %n\n *updating*database And a typical (root) session with the passwd command is:- # passwd jkent Changing local password for jkent. New password: Retype new password: passwd: updating the database... passwd: done # HELP! Side issue. Is it right that 'fred' and 'fredfred' are equivalent passwords in (at least some part of) SMB? Mac Assistant Systems Adminstrator @nibsc.ac.uk dmccann@nibsc.ac.uk Work: +44 1707 654753 x285 Everything else: +44 7956 237670 (anytime)
Steven Mackenzie
2002-Feb-26 09:46 UTC
[Samba] unix password sync doesn't update smbpasswd file!
> > Any one got 'unix passwd sync' working in 2.2.3a ?Works for me (Samba 2.2.3a-5mdk binary - that is, 2.2.3a plus printer settings patch). I can change the password from Windows clients (Ctrl-Alt-Delete>Change Password) and from the Linux command line, very responsive, no problems.> Could it be a 'passwd chat' issue? Mine is currently:- > *new*password %n\n *new*password %n\n *updating*databaseMine is *New*password* %n\n *new*password* %n\n *updated* which works on Mandrake 8.0 (+various updates) Good luck, Steven
I know, I know, not always good form to follow up one's own posts....>To: samba@samba.org >From: Mac <dmccann@nibsc.ac.uk> >Subject: [Samba] unix password sync doesn't update smbpasswd file! >Date: Tue, 26 Feb 2002 16:53:36 +0000 (GMT) > >Having worked through debugging my 'chat script', I now have >the following situation:- > >When unix password sync = yes > smbpasswd works, but only the UNIX password is changed > >When unix password sync = no > smbpasswd works, and only the encrypted password is changed. > > >Moreover, in the first case, smbpasswd takes (at least) 22 seconds to >return the prompt, but in the second, only 2-3 seconds.Right. The 20 seconds appears to be 'smbpasswd's built in time out (discovered by running it with -D 100) and nothing to do with the server-side timing out In fact, the child process on the server side is still running! (and in a 'ttywait' state), and so the smbd that forked it (the one created when smbpasswd connected) is still around too. Moreover the child won't die, even with kill -9. Killing the parent (-15) takes them both out.> >Could it be a 'passwd chat' issue? Mine is currently:- > *new*password %n\n *new*password %n\n *updating*databaseTypo in original message. There _is_ a '*' on the end of my chat string. Thanks to all who've already responded. Mac Assistant Systems Adminstrator @nibsc.ac.uk dmccann@nibsc.ac.uk Work: +44 1707 654753 x285 Everything else: +44 7956 237670 (anytime)
Steven J Mackenzie
2002-Feb-26 14:32 UTC
[Samba] unix password sync doesn't update smbpasswd file!
----- Original Message ----- From: "Mac" <dmccann@nibsc.ac.uk>> Good. At least it's not a 2.2.3a bug. I take it you have to use > 'smbpasswd' on the Linux command line?Yes, I've left it like that ...> >> Could it be a 'passwd chat' issue? Mine is currently:- > >> *new*password %n\n *new*password %n\n *updating*database > >Mine is > >*New*password* %n\n *new*password* %n\n *updated*> Hmmm. Drat. No obvious problem with the chat script either then. > (In my original post I missed the final '*' off the end. It is there in > my smb.conf)There are a few extra *s in my version - they look like they might be uneccessary, but I remember it taking a few goes to get it set up so that it worked :(> P.S. Just out of interest, if a user tried to change password from > a Linux prompt using ordinary 'passwd' command would that make them > out-of-sync?Yes, it does leave things out of sync. I've thought about aliasing passwd to smbpasswd to stop this happening, but as there hasn't been a problem yet, I haven't bothered. Most users only use Windows here, and smbpasswd won't work if the Samba server isn't running, which could be confusing :/ Oddly, I have (once) seen the root smbpasswd get changed without the unixpasswd staying in sync, and I'm not sure how or why this happened. Sometimes the PDC (Linux) rejects a new passwd as being bad (too short, or whatever), but this gets reported to the user as "bad username or old passwd" on Windows ... ?