How to make Linux account moving

zhaozj2021-02-11  207

How to make Linux account moving

Skill administrator (2000-12-23 09:45) 〖Back〗 〖Forward〗

Sometimes you need to make Linux account moving, its method is as follows: 1. Ensure that the new account to be added to the system is placed in a new location, which is implemented by modifying the Home value in the / etc / default / usradd file. Such as: home = / home2 makes the new account of the primary directory of / home2. 2. Move the existing account to a new location. This can be implemented as follows: First, copy the primary directory of the existing account to the new location, available below: cp -a / home / home2 or cp -rpd / home / home2 then modify / etc / The home_directory domain recorded in the Passwd file is / home2 / username. These two steps have moved the old account to a new location. Be sure you can delete the old primary directory of the old account, to make the space for the original file system

转载请注明原文地址:https://www.9cbs.com/read-3599.html

New Post(0)