如何在Linux服务器间移动用户帐户

http://tech.ddvip.com   2007年02月23日    社区交流

本文详细介绍如何在Linux服务器间移动用户帐户

  如何在新旧服务器间转移Linux用户帐号是件令管理员头疼的事情,但是下面的这篇文章可以很好的为我们展示在不借助别的工具情况下,如何在两台服务器间转移帐户。  

  Q. How do I Move or migrate user accounts to from old Linux server a new Cent OS Linux server including mails? This new system a fresh installation.

  A. You can migrate users from old Linux server to new Linux sever with standard commands such as tar, awk, scp and others. This is also useful if you are using old Linux distribution such as Redhat 9 or Debian 2.x.

  Following files/dirs are required for traditional Linux user management:

  * /etc/passwd - contains various pieces of information for each user account

  * /etc/shadow - contains the encrypted password information for user’s accounts and optional the password aging information.

  * /etc/group - defines the groups to which users belong

  * /etc/gshadow - group shadow file (contains the encrypted password for group)

  * /var/spool/mail - Generally user emails are stored here.

  * /home - All Users data is stored here.

  You need to backup all of the above files and directories from old server to new Linux server.

  Commands to type on old Linux system

  First create a tar ball of old uses (old Linux system). Create a directory:

  # mkdir /root/move/

  Setup UID filter limit:

  # export UGIDLIMIT=500

责编:豆豆技术应用

正在加载评论...