passwd behavior changed / not working

General support questions
Post Reply
amitcent_26
Posts: 3
Joined: 2018/03/19 07:28:26

passwd behavior changed / not working

Post by amitcent_26 » 2018/03/19 07:38:10

Hi Guys,

I am running into a weird issue. I created an user (Using useradd / adduser). Trying to set password for it using passwd, which does nothing but just bring it to root.

[root@servername ~]# passwd ravi
[root@servername root]#

This is even happening while being on root, when I type passwd and enter from root prompt, it should ask to change password, but it goes like -
[root@servername ~]# passwd
[root@servername root]#

Can somebody please help to identify the issue ?


thanks,
Amit

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: passwd behavior changed / not working

Post by avij » 2018/03/19 08:19:01

What do you get with which passwd ? Does rpm --verify passwd output something? Normally it should not output anything. Are you the only user who has root access on that system, ie. is it possible that someone else has screwed something up?

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: passwd behavior changed / not working

Post by TrevorH » 2018/03/19 09:29:14

Also try /bin/passwd to make sure it's running the correct thing
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

amitcent_26
Posts: 3
Joined: 2018/03/19 07:28:26

Re: passwd behavior changed / not working

Post by amitcent_26 » 2018/03/19 15:34:47

avij wrote:What do you get with which passwd ? Does rpm --verify passwd output something? Normally it should not output anything. Are you the only user who has root access on that system, ie. is it possible that someone else has screwed something up?
Thanks for responding man !
There r a few other who have su to root access, I doubt too that someone has screwed something up.

So output of which passwd

[root@servername ~]# which passwd
/bin/passwd


and output of rpm --verify passwd

[root@servername ~]# rpm --verify passwd
.......T. c /etc/pam.d/passwd
..5....T. /usr/bin/passwd
[root@servername ~]#

Can we do a yum install passwd, will it overwrite any existing file (user/passwords) or just install new binaries ?

amitcent_26
Posts: 3
Joined: 2018/03/19 07:28:26

Re: passwd behavior changed / not working

Post by amitcent_26 » 2018/03/19 15:36:55

TrevorH wrote:Also try /bin/passwd to make sure it's running the correct thing
Hi -

output of /bin/passwd

[root@servername ~]# /bin/passwd
[root@servername root]#

Its really weird :?

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: passwd behavior changed / not working

Post by TrevorH » 2018/03/19 15:51:26

..5....T. /usr/bin/passwd
So the md5sum and timestamp of the /bin/passwd file does not match what rpm expects. I'd be suspicious about now but check the file and see what its content is - perhaps someone did something silly and meant to pipe into /bin/passwd but redirected on top of it instead. Or maybe it's more serious.

If it's the trivial "someone with root overwrote it by mistake" then yum reinstall passwd will fix it. If it's not trivial, break out the backups and start the reinstall...
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply