Rename a user / change username: Difference between revisions
From Andreida
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
usermod -l newname oldname |
usermod -l newname oldname |
||
/etc/init.d/dovecot start |
/etc/init.d/dovecot start |
||
(not sure yet if a reboot helps prevent problems) |
Revision as of 19:38, 21 February 2023
Avoid to change the passwd directly. There might be problems in some cases.
Instead use:
usermod -l newname oldname
Rules:
- only lowercase
- only use '-' as special character, but avoid it if you can
In case the user is using imap to access the mail server you will have to shut down the service temporarily I think.
/etc/init.d/dovecot stop usermod -l newname oldname /etc/init.d/dovecot start
(not sure yet if a reboot helps prevent problems)