Authentication token error?!?!

Hi all,

I have upgraded my old RedHat 6.2 box to RedHat 7.3. I had couple hundreds of users on that box so i just migrated all the user account to a new box by transfering home directories, and appending to /etc/passwd /etc/shadow /etc/group. I have preserved all permittions. Everything works just fine. Users are able to log in. As soon as i try to change user password the following thing happens:

[root@localhost root]# passwd myuser
Changing password for user myuser.
passwd: Authentication token manipulation error
[root@localhost root]#

Any suggestions how i can fix it?

Thank you all in advace.

That is quite a jump in OS versions.

I have seen problems with other versions of Unix, Amdahl, where they don't like importing another /etc/passwd file from an older version of the OS. We recently did an upgrade and had similar problems, but much worse than yours. Users weren't able to login.

My experience is that it is some internal error. We had to rebuild the passwd files on each of 8 or so servers.

Couple of questions. Did you use /etc/shadow before? How did you append? Simply by ftp or rcp and >> passwd?

here is something I found on HP's website www.itrc.hp.com

http://docs.hp.com/cgi-bin/fsearch/framedisplay?top=/hpux/onlinedocs/B2355-90683/B2355-90683_top.html&con=/hpux/onlinedocs/B2355-90683/00/03/399-con.html&toc=/hpux/onlinedocs/B2355-90683/00/03/399-toc.html&searchterms=Authentication|token|manipulation|error|passwd&queryid=20020528-132922

You may have something different but similar to this. Hope it helps you out. Look at the return values down the page. You will see your exact error message.
:cool:

[quote]
Originally posted by Kelam_Magnus
[b]That is quite a jump in OS versions.

Couple of questions. Did you use /etc/shadow before? How did you append? Simply by ftp or rcp and >> passwd?

i have connected and old harddrive physically, and mounted it. Then just appended like "cat old_passwd >> /etc/passwd" Then i removed duplicated accounts by hand. Then i copied /etc/passwd to /etc/shadow...Coz 6.2 didnt have shadowing back then. I guess i need to convert it somehow. Any suggestions?

Thank you so much

Check the man page for "pwconv".

The shadow file has a different layout than the passwd file.
If you mv the /etc/shadow file to something like /etc/shadow_nogood (just in case you want it back later), make sure the passwd file is set up, and use pwconv to "switch" over to a shadowed setup.

Just in case, keep a boot disk handy next time you reboot, although you shouldn't really need it.

HI all

I have tried pwconv and pwunconv...it didnt work. It would keep on running for internity i guess. I have left it for 2 days...didnt get any results. Any suggestions?

Thank you all.

Hmm...

Try running /usr/sbin/pwck

It will check the integrity of your passwd and shadow files.

Hi,

I have run pwck. It gives me an error in every entry saying "invalid entry". What do i do next?

Thank you all

You will probably need to script using a for loop and awk to get the format of the /etc/shadow file correct.

1) awk -F: ' { print $1 }' < /etc/passwd > user.ids

Depending on the layout, you may need addl data from the passwd file to properly create the shadow file.

2)
for name in 'cat user.ids'
do
awk '{ print $name "put your shadow format here" }' >> shadow.out
done

Something like this may solve your problem. Just make sure that you can duplicate the format of the /etc/shadow file.

IF ALL ELSE FAILS...
You may need to go to the RedHat site and search for conversion from an OS without a shadow file to an OS version with /etc/shadow implemented.

:smiley: :wink:

Hi,

I have tried whatever you told me didnt work :(, and searched internet for the whole weekend. NOTHING.

I was playing with pwconv and pwunconv...a strange thing happened. I have changed permitions on /etd/passwd to 755 and removed /etc/shadow. Now i'm able to run pwunconv. It takes like a couple of seconds, but it wouldnt create any /etc/shadow or smth like that. ????

I appreciate your help, guys.