Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing users?

Status
Not open for further replies.

xevious

Technical User
Jun 27, 2008
1
GB
Hello people inside my computer! Im a newbie so pls be gentle.

In aix can i change a user id without removing it?

Some guy here has changed his name by deed poll and so wants his user id changing to match. Im new at this but from a manual i have it seems i can edit the /etc/passwd file, the /etc/security/passwd and /etc/security/user, and then change his home dir. He has a lot of stuff around so I didn't want to remove him and start from the beginning.

Thx.



 
All you need to do is to go to smitty users -> Change user Char.... (bla bla bla as i don't have an aix box right now) -> and then enter his/her old user name. Note down the old user ID, change it to a different one. Save your changes and then go back to the main users menu (probably by exiting and using smitty users again or just press F3 twice) -> Choose Change user Char again and this time enter the new user name. Change the user ID to the old one!

Done!

You might need to look at the group membership if it is different as well! If they are different then you will have to use chown command to change the ownership of his/her old filenames to the new (I hope you are familar with chown command otherwise see man chown)

For the old home directory, it is easier to copy all its content to the new location provided you change the owership as said above!

Please don't hesitate to ask for clarification!

Regards,
Khalid
 
By the way xevious, you can do the above using chuser command!


and i just glanced that the fast path for changing users is smitty chuser (instead of using smitty users and then Change user Char ....)

It is not advicable to edit /etc/passwd or /etc/security/passwd directly! Try always to use AIX commands (or smitty :)

Regards,
Khalid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top