Rename a user / change username: Difference between revisions

From Andreida
(Created page with "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 chara...")
 
No edit summary
Line 7: Line 7:
* only lowercase
* only lowercase
* only use '-' as special character, but avoid it if you can
* 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

Revision as of 18:53, 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