Operating System - Linux
1830239 Members
2066 Online
109999 Solutions
New Discussion

Authentication token manipulation error .. when creating user manually

 
SOLVED
Go to solution
Maaz
Valued Contributor

Authentication token manipulation error .. when creating user manually

OS = rhl 9
I tried to create users manually
I did the following

1. vi /etc/passwd and add a line
maaz:x:625:625::/home/maaz:/bin/bash

2. vi /etc/group and add a line
maaz:x:625:

3. mkdir /home/maaz

4. chown maaz.maaz /home/maaz

5. then copy /etc/skel/* to the /home/maaz

but when I type

6. passwd maaz

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

Any1 any ideaz

Thanks in anticipation
Regards
Maaz
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: Authentication token manipulation error .. when creating user manually

Thats now how you are supposed to add users.

There are three files that are updated when a user is added with the useradd command.

/etc/passwd # user list
/etc/group # a group is added
/etc/shadow # encrypted password file.

useradd helps with this. I've done it the manual way. So long as you do all 3 files and don't have a conflict in the numeric id numbers it can be done.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Alexander Chuzhoy
Honored Contributor

Re: Authentication token manipulation error .. when creating user manually

Hi,
you can use the authconfig utility to unselect the "shadow passwords" option and then you won't have to edit the /etc/shadow file when adding users,otherwise Steve's way is necessary.
Maaz
Valued Contributor

Re: Authentication token manipulation error .. when creating user manually

Many Thanks SEP, and Alexander.

Regards
Maaz
HGN
Honored Contributor

Re: Authentication token manipulation error .. when creating user manually

Hi

U can edit the passwd file
vi /etc/passwd and add the user id

then edit group file
vi /etc/group and append the user to a group or create a new group

do a pwconv
then do a passwd

it should come back and say all token syncrinised sucessfully.
Dont forget to create the home directory with the required permission with ownership and group privelege

Hope this helps

Rgds

Gopi