Renaming User Account
Jim Richardson
warlock at eskimo.com
Mon Nov 7 08:53:17 UTC 2005
On Sun, 2005-11-06 at 08:18 -0500, Jack Jackson wrote:
> Can I change the name of a user, retaining all the user home directory
> properties? For example, changing user fred to user fsmith?
>
> How?
>
Just change the name in /etc/passwd and /etc/group
in a cli, type groups old_username to get a listing of what groups that
user belongs to, and you can change those in /etc/groups (or just do a
global search and replace on that file with oldname/newname.) Then
change the entry in /etc/passwd and /etc/shadow and /etc/gshadow. Also
check that the username isn't used in /etc/aliases.db, adjust
accordingly.
Grepping through /etc/ for the username in question is a good start.
--
Jim Richardson http://www.eskimo.com/~warlock
"It doesn't matter who you vote for, the government always gets in"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20051107/42ccf0ab/attachment.sig>
More information about the ubuntu-users
mailing list