From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021203 Description of problem: It might seem odd that I report this as a glibc problem, but I can reproduce it on 5 completely unrelated systems and the only thing in common upgraded lately is glibc. Basically, mkpasswd stopped working about a month ago. When I run it with -v, it shows that passwd ignores the input, mkpasswd kills it after a couple of seconds and claims that password has changed, but it hasn't. Also, /etc/.pwd.lock appears and isn't deleted. I have been using mkpasswd the same way for almost 3 years. Actually, I noticed that since glibc upgrade if you run mkpasswd first time ever on the system, it seems to work. After that, it NEVER works, even if you delete /etc/.pwd.lock. It looks like something is locked somewhere hidden :-) Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. mkpasswd some_user_login 2. wait 3. mkpasswd reports success but nothing happened. Sometimes, it just hangs instead. Actual Results: mkpasswd either hangs or reports success (but doesn't change password). First time ever on a system it seems to work correctly, but after that it's broken. Expected Results: The password should have been changed. Additional info: I can reproduce this on three 7.2 systems, one 7.3 and one 8.0.
New tests show that if you leave machine running without running mkpasswd for a couple of days, it magically fixes itself. I double checked none of passwd/mkpasswd/expect are running in the background while this happens (that could have caused the files to be locked). A typical session looks like this: -------------------------------------------------------------------------- [root@noir tmp]# rm -f /etc/.pwd.lock;grep tester /etc/shadow;mkpasswd -v tester;grep tester /etc/shadow tester:$1$Vv0OPy1e$vbeV7jSn8QzHW9wnX5Wlu.:12041:0:99999:7::: spawn passwd tester Changing password for user tester New password: J63nap}Cd Retype new password: J63nap}Cd password for tester is J63nap}Cd tester:$1$Vv0OPy1e$vbeV7jSn8QzHW9wnX5Wlu.:12041:0:99999:7::: -------------------------------------------------------------------------- As you see, the password wasn't changed. I was able to reproduce it on 2 other machines now AND I could also check it possibly isn't glibc related, because it also happens on glibc-2.2.4-29. I am attaching a strace of the passwd being run from mkpasswd, perhaps then someone can find the cause and fix it. MfG shurdeek
Created attachment 88827 [details] Strace of passwd being run from mkpasswd
I doubt that this problem has anything to do with glibc. First, can you try this with RHL9? Second, I've assigned the problem to tcltk. expect is listed as the package which contains this problem.
Are you still seeing this with recent releases of Red Hat Linux?
I currently don't have a RH9 machine. It's still broken with latest rh8 updates though. Anyway, it isn't important to me anymore, there is a simple workaround, instead of "mkpasswd user" use "mkpasswd|passwd --stdin user".
I confirm a similar behaviour on RH 9. mkpasswd sometimes (quite often) simply hangs. I was not able to reproduce the problem with strace (in this case the mkpasswd terminates correctly. ^C does not work and to kill the process you need to send a KILL signal.
mkpasswd still hangs for me reproducibly with expect-5.39.0.
mkpasswd has been removed in expect-5.39.0-98: * Mon Jun 21 2004 Alan Cox <alan> - Autopasswd doesnt work and isnt ever going to work with pam around since password setting depends on the modules in use (think "fingerprint" or "smartcard"..). Remove it.