Rename a user / change username: Difference between revisions
From Andreida
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
Rules: |
Rules: |
||
* |
* start with a lowercase letter |
||
* only lowercase letters and digits |
|||
* only use '-' as special character, but avoid it if you can |
* only use '-' as special character, but avoid it if you can |
||
Latest revision as of 19:03, 23 February 2023
Avoid to change the passwd directly. There might be problems in some cases.
Instead use:
usermod -l newname oldname
Rules:
- start with a lowercase letter
- only lowercase letters and digits
- 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)