Weblog entry #3 for kaerast
Crontabs for that user will stop running. The crontab for the old username will remain in /var/spool/cron/crontabs/oldusername so can easily be copied and pasted with crontab -e and the right permissions. I'm tempted to look into bug reports for this, "crontab -u oldusername -e" returns user unknown, which is technically correct but not entirely helpful.
Gnome will stop loading. This is especially true if you move your home directory and/or change ownership. This can be fixed by changing group ownership and/or creating a symlink from the old home directory.
Apache will break. This can be fixed by editing any virtual sites running form the moved home directory, and any /~username links will need changing.
Mail will do something. We weren't running mail on either of the servers we renamed users on, but I'm fairly sure something will need doing.
MySQL usernames will be out of sync. You can manually rename the MySQL user associated with the shell account which will then break other things, or you can leave as is.
Sudo will break. This is bad. This is very bad. If you break sudo and don't have root access through any other method then you lose root access completely. If you do have root access through another method then you are ok to edit sudoers after renaming the account.
Other authentication may break. Shell accounts are often synchronised with samba, ftp servers, mail servers, ldap, nis, nfs and various other server software. This may be done directly by reading /etc/passwd or it may be done by synchronisation scripts. You need to think about what's running on your server before renaming accounts.
Comments on this Entry
[ Send Message | View cparker's Scratchpad | View Weblogs ]
[ Parent | Reply to this comment ]
Now, what happens when you change the username and the old username is already in all those small configuration files in /etc?
Kaerast is right. It's not worth the trouble.
[ Parent | Reply to this comment ]
As long as you keep the uid the same, it should all just work.
[ Parent | Reply to this comment ]
[ Parent | Reply to this comment ]
usermod -d /home/bar -m -l bar foo
[ Parent | Reply to this comment ]