Operating System - HP-UX
1822430 Members
2879 Online
109642 Solutions
New Discussion юеВ

passwd command hangs when trying to change password.

 
rob nolen
Advisor

passwd command hangs when trying to change password.

Hello,

I am trying to change the password for a user on my 11iv2 box. When I type passwd , my shell just hangs... doesn't do anything at all. I have to ctrl-c to get back to a prompt.

Anyone ever experience this before?
11 REPLIES 11
A. Clay Stephenson
Acclaimed Contributor

Re: passwd command hangs when trying to change password.

The first thing that I would do is "type passwd" to determine if you are running the "real" passwd command. You could be running a Trojan Horse.
If it ain't broke, I can fix that.
rob nolen
Advisor

Re: passwd command hangs when trying to change password.

/usr/bin/passwd.

In sam, I can change passwords fine.

If I just type passwd to change password for root, pops right up and asks me for the new password.

Robert-Jan Goossens
Honored Contributor

Re: passwd command hangs when trying to change password.

could you tell a bit more about your system, trusted? shadow passwd file? nis?

Best regards,
Robert-Jan
john kingsley
Honored Contributor

Re: passwd command hangs when trying to change password.

Try running pwck to look for problems with your password file.

Is this an NIS user account you are trying to change?

Is this a trusted system?
Bill Hassell
Honored Contributor

Re: passwd command hangs when trying to change password.

Or do you have NIS for passwords? Hangs are often related to networking problems.


Bill Hassell, sysadmin
rob nolen
Advisor

Re: passwd command hangs when trying to change password.

Sorry for the lack of detail.

We are not running shadow, no NIS, and not a trusted system.

All accounts are local to this machine, and we aren't doing anything over the network.

A. Clay Stephenson
Acclaimed Contributor

Re: passwd command hangs when trying to change password.

One of the big differences when you run passwd as root is that you are probably running /sbin/passwd rather than /usr/bin/passwd. By any chance, have you "improved" the security of your system and cleared the setuid bit on /usr/bin/passwd? Also, do a bdf and make sure that there are no full filesystems -- especially /var and /.
If it ain't broke, I can fix that.
rob nolen
Advisor

Re: passwd command hangs when trying to change password.

Funny. When I run /sbin/passwd it works fine. Suid bit is still on /usr/sbin/passwd.

rob nolen
Advisor

Re: passwd command hangs when trying to change password.

Also, filesystems have plenty of free space.


John Kittel
Trusted Contributor

Re: passwd command hangs when trying to change password.

I'd still be suspicious that /usr/bin/passwd is not the "real" one. For example, probably a bad practice, but I've seen passwd be replaced with a wrapper that attempts to add some other functionality. Don't know how to determine for sure if that is the case. You could at least try "file /usr/bin/passwd" and "ll /usr/bin/passwd", see if anything looks funny ( or post results).

Also, I thought John Kingsley's suggestion to run pwck was good. Did you try that?
A. Clay Stephenson
Acclaimed Contributor

Re: passwd command hangs when trying to change password.

You should be able to run passwd under tusc to find out what system call it is waiting to complete.
If it ain't broke, I can fix that.