Haven't been able to really find a how-to on changing a username in unix on the net. I thought of 2 ways of doing this, the first being the easiest, but I wanted to know if anyone has run into problems doing it this way?
First off it's a solaris 8 system using shadow passwords.
I simply change the /etc/passwd file and edit the users name, leaving everything else the same. Then I edit the /etc/shadow file and do the same. Then I check the /etc/group file for memberships and change the username in it. Does anyone see a problem with going it this way?
Thanks for your help.
The other method was to create a new user, give him the same group memberships, then once done, change the /etc/passwd file and give him the same UID as the original user, and the same home dir. Then delete the original user.
If you know of a better way, please let me know.
Phil
First off it's a solaris 8 system using shadow passwords.
I simply change the /etc/passwd file and edit the users name, leaving everything else the same. Then I edit the /etc/shadow file and do the same. Then I check the /etc/group file for memberships and change the username in it. Does anyone see a problem with going it this way?
Thanks for your help.
The other method was to create a new user, give him the same group memberships, then once done, change the /etc/passwd file and give him the same UID as the original user, and the same home dir. Then delete the original user.
If you know of a better way, please let me know.
Phil