Is it feasible to relabel a Unix customer account?
I mounted Ubuntu on a computer system that is currently made use of by someone else. I relabelled the account with her name, yet it just transforms the fullname, not the customer name, which is still presented in the leading right (in the
fast-user-switch-applet). Exists a command to relabel an Unix customer account?
I've considered developing a new customer account with the new name, and afterwards replicating every little thing in the "old" residence to the residence of the new account. Would certainly it suffice? Yet after that I assume the documents would certainly have the old account's approvals' proprietor? So should I do
chown -R newuser ~?
Exists a simpler/recommended means to do this?
While it is feasible to relabel a customer, and also
usermod, this is fairly most likely to create problem. Below is a checklist of areas where the customer name might show up ; I do not assert that this checklist is extensive.
- The customer access in
/etc/passwdand also relevant documents (as an example
- Team access in
- Perhaps access in
- The system mail box, commonly
- The crontab, commonly
The residence directory site is most likely to show up in a lot more areas. Several applications write outright courses in numerous dot documents. If you determine to relabel the residence directory site too (while there is no need that customer
alice is residence directory site be
/home/alice, having it be
/home/bob would certainly be complex), you'll require to care for those. An international substitute will certainly benefit the majority of applications, yet I make no assurances. When possible, maintain the old residence directory site name as a symbolic link to the relabelled directory site.
usermod --move-home --login <new-login-name> --home <new-home-dir> <old-login-name>
--move-home alternative relocates the old residence directory site's materials to the new one offered by the
--home alternative which is developed if it does not currently exist.
If you desire the key customer team to match the
--gid <new-login-name> to the command over, yet the team has to be pre - existing.
See the male web page for even more details :