passwd isn't working

I am a new member and have been trying to get a gentoo install up and running. I sucesfully installed an image and upgraded it and then found that the passwd wasn't working.

When I tried to set the password for mysql it didn't work so I tried to set up a user as root and the password would show up in /etc/shadow as clear text, not hashed. When I tried

passwd kirby

and try to set the password I get:

passwd: Authentication Token manipulation Error

I searched around many forums and found no answer other than to do a reinstall.

I reinstalled a fresh gentoo image and before ever upgrading it tried to add a new user and had the same problem. Anytime I try to set the password I get an Authentication Token manipulation Error.

Is there any way to fix this problem. There is no use trying to set up a server if the passwd function is not working.

8 Replies

How did you add this user in the first place?

Sounds like it has an entry in /etc/passwd but not /etc/shadow.

If so pwconv may sort it out.

I added the user with useradd. The user is in both /etc/passwd and /etc/shadow. the password entry in /etc/shadow is in plain test and not hashed out. I tried pwconv with no luck. As root if I try to

passwd kirby

I get:

passwd: Authentication Token manipulation Error

This goes beyond adding users since mysql passwords are also giving me problems. Even if I can work around the user password problem what about other passwords like in mysql?

I checked that crypt.h is installed and it is so I am lost. I will add I am an expereinced gentoo user with many installs and never had a problem until now.

@Sarpy Sam:

=

passwd: Authentication Token manipulation Error

What have you changed since install?

What are the permissions on /bin/passwd, /etc/passwd, and /etc/shadow?

strace passwd should tell you where it went wrong.

As I said in my original post I installed a new image and without doing anything else tried to add a new user. The password did not take and I could not login as user. The password shows as plain text in /etc/shadow and is not encrypted. I compared all permissions for files you listed and all files having to do with encryption with my good install at home and everything is the same.

The advice I find on the Internet for this problem usually comes down to file system corruption and the only solution is a reinstall. I have tried this with no luck. Any other ideas?

Well something has changed since you deployed the image.

I tried this with a new gentoo image and it worked as expected:

This is localhost.(none) (Linux i686 2.4.29-linode39-1um) 13:11:50

localhost login: root

Password:

localhost root # useradd testuser

localhost root # passwd testuser

New UNIX password:

BAD PASSWORD: it's WAY too short

Retype new UNIX password:

passwd: password updated successfully

I am in contact with the adminstrator of Linode and we are trying to figure it out. His test install worked fine too. I am currently upgrading glibc on my fresh install to see if that helps.

No idea if it helps track the problem down, but I notice that sednet used a 2.4.x kernel for the test. Does it work with a 2.6.x kernel?

Also, Sam, are you using the 'latest' kernel series or a specific kernel?

(I should mention at this point that I use Gentoo with the latest 2.6.x kernel series and it's been fine for me, but you never know.)

I guess I should have posted a while ago. I never could get it to work right. I tried another image and had the same problem. I finally cleared everything out and started over again from scratch. that I am aware of I did nothing different and now it is working like a champ. I have no idea what the problem was or how it fixed itself. Third times a charm I guess.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct