Just use vipw(8) and change the username and home directory. Rename the home directory itself and you're done. You may also want to rename the corresponding group name.
chpass(1) can also be used to change the username. (Keep in mind that various types of access control lists - and even app customizations - might be relying on the old username).
[CMD="ggg"][/CMD]I want to point out that chpass(1) does not work to change the name of an account as suggested.
I am testing under FreeBSD 9.0, and after editing the name of the account using this command, the result is a new record in /etc/passwd with the new name (the rest of the fields containing the same data as the original record), and the original record remains unchanged.
So the result is two records with the same user id, which is incorrect.
Any other possibility besides manually editing?/etc/passwd and, of course, /etc/group (to change the name of the corresponding group plus any other group that the account might be part of.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.