用户工具

站点工具


linux:migrate

这是本文档旧的修订版!


Migrate

Migrate Linux from X to Y.

Rename user

First of all, login with root , then using usermod to change username:

usermod -l newUserName -d /home/newUserName -m oldUserName
Linux use uid to identify user, so changing username will not affect permissions.

Then, find all broken symlinks and fix it:

find . -xtype l

Last but not least, Search all configurations and change username, I recommand ripgrep.

rg oldUserName

Reference

linux/migrate.1533879655.txt.gz · 最后更改: 2023/12/03 10:24 (外部编辑)