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!

Linux users

Status
Not open for further replies.

finicky

Technical User
Jul 1, 2003
3
US
How do i transfer ownership from one linux user to another?
 
they don't want to delete the id, the manager wants to take the id over with their name as owning the id. In AIX I would normally update /etc/passwd and change the gecos field, but i'm new to linux and not sure how to do that. Also how do i get a help menu on linux..? like man pages for aix..?
 
Man pages? Issuing the command "man [command]" will do it. Some Linux distributions also support the command "appropos [topic]".

Check out "man usermod". That will allow you to change a username, keeping everything else intact.

Want the best answers? Ask the best questions: TANSTAAFL!
 
On some linux distro's you can also use the "info [command]"
as in:

info usermod

You need to take care when changing ownerships as this user may have had scripts, crons etc that was run by himself and they may complain at a file ownership change.

Otherwise, I guess that you could do something similar to this:

1) usermod -e <todays date> <user> # to expire that users login.
2) check in /var/spool/cron # and check for any cronfile belonging to that user and check it for clues to what he/she may have croned.
3) check /etc/groups #to confirm that no other users are members of his/her group, else they may start complaining.
4) cd /path/to/home/of/that-user and do: chown -R newuser:newusersGID /path/to/home/of/that-user # this will pass owneship of all files for that user to newuser

That should do it ?

Good Luck
Laurie.
 
Thanks that helped, i transferred the ownership over to the new user.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top