Bug 79846 - mkpasswd hangs often
Summary: mkpasswd hangs often
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: expect   
(Show other bugs)
Version: 1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jens Petersen
QA Contact: Bill Huang
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-12-17 14:53 UTC by Peter Surda
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-05 04:17:39 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Strace of passwd being run from mkpasswd (18.72 KB, text/plain)
2002-12-20 06:04 UTC, Peter Surda
no flags Details

Description Peter Surda 2002-12-17 14:53:55 UTC
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.

Comment 1 Peter Surda 2002-12-20 06:03:13 UTC
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

Comment 2 Peter Surda 2002-12-20 06:04:21 UTC
Created attachment 88827 [details]
Strace of passwd being run from mkpasswd

Comment 3 Ulrich Drepper 2003-04-22 07:46:26 UTC
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.

Comment 4 Jens Petersen 2003-04-22 11:50:44 UTC
Are you still seeing this with recent releases of Red Hat Linux?

Comment 5 Peter Surda 2003-04-22 21:54:46 UTC
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".

Comment 6 Matteo Corti 2003-06-16 08:10:56 UTC
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.

Comment 7 Jens Petersen 2004-02-26 07:45:59 UTC
mkpasswd still hangs for me reproducibly with expect-5.39.0.

Comment 8 Jens Petersen 2004-08-05 04:17:39 UTC
mkpasswd has been removed in expect-5.39.0-98:

* Mon Jun 21 2004 Alan Cox <alan@redhat.com>
- 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.


Note You need to log in before you can comment on or make changes to this bug.