<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=HOWTO%3A_Migrasi_Account_Lama_ke_Komputer_Baru</id>
	<title>HOWTO: Migrasi Account Lama ke Komputer Baru - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://onnocenter.or.id/wiki/index.php?action=history&amp;feed=atom&amp;title=HOWTO%3A_Migrasi_Account_Lama_ke_Komputer_Baru"/>
	<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=HOWTO:_Migrasi_Account_Lama_ke_Komputer_Baru&amp;action=history"/>
	<updated>2026-04-06T09:38:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.4</generator>
	<entry>
		<id>https://onnocenter.or.id/wiki/index.php?title=HOWTO:_Migrasi_Account_Lama_ke_Komputer_Baru&amp;diff=35957&amp;oldid=prev</id>
		<title>Onnowpurbo: New page: Sumber: http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/ Q. How do I Move or migrate user accounts to from old Linux server a new Cent OS Linux server inclu...</title>
		<link rel="alternate" type="text/html" href="https://onnocenter.or.id/wiki/index.php?title=HOWTO:_Migrasi_Account_Lama_ke_Komputer_Baru&amp;diff=35957&amp;oldid=prev"/>
		<updated>2013-03-21T01:18:29Z</updated>

		<summary type="html">&lt;p&gt;New page: Sumber: http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/ Q. How do I Move or migrate user accounts to from old Linux server a new Cent OS Linux server inclu...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Sumber: http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Following files/dirs are required for traditional Linux user management:&lt;br /&gt;
* /etc/passwd - contains various pieces of information for each user account&lt;br /&gt;
&lt;br /&gt;
* /etc/shadow - contains the encrypted password information for user's accounts and optional the password aging information.&lt;br /&gt;
&lt;br /&gt;
* /etc/group - defines the groups to which users belong&lt;br /&gt;
&lt;br /&gt;
* /etc/gshadow - group shadow file (contains the encrypted password for group)&lt;br /&gt;
&lt;br /&gt;
* /var/spool/mail - Generally user emails are stored here.&lt;br /&gt;
&lt;br /&gt;
* /home - All Users data is stored here.&lt;br /&gt;
&lt;br /&gt;
You need to backup all of the above files and directories from old server to new Linux server.&lt;br /&gt;
Commands to type on old Linux system&lt;br /&gt;
&lt;br /&gt;
First create a tar ball of old uses (old Linux system). Create a directory:&lt;br /&gt;
# mkdir /root/move/&lt;br /&gt;
Setup UID filter limit:&lt;br /&gt;
# export UGIDLIMIT=500&lt;br /&gt;
Now copy /etc/passwd accounts to /root/move/passwd.mig using awk to filter out system account (i.e. only copy user accounts)&lt;br /&gt;
# awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534)' /etc/passwd &amp;gt; /root/move/passwd.mig&lt;br /&gt;
Copy /etc/group file:&lt;br /&gt;
# awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534)' /etc/group &amp;gt; /root/move/group.mig&lt;br /&gt;
Copy /etc/shadow file:&lt;br /&gt;
# awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow &amp;gt; /root/move/shadow.mig&lt;br /&gt;
Copy /etc/gshadow (rarely used):&lt;br /&gt;
# cp /etc/gshadow /root/move/gshadow.mig&lt;br /&gt;
Make a backup of /home and /var/spool/mail dirs:&lt;br /&gt;
# tar -zcvpf /root/move/home.tar.gz /home&lt;br /&gt;
# tar -zcvpf /root/move/mail.tar.gz /var/spool/mail&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
&lt;br /&gt;
    Users that are added to the Linux system always start with UID and GID values of as specified by Linux distribution or set by admin. Limits according to different Linux distro:&lt;br /&gt;
        RHEL/CentOS/Fedora Core : Default is 500 and upper limit is 65534 (/etc/libuser.conf).&lt;br /&gt;
        Debian and Ubuntu Linux : Default is 1000 and upper limit is 29999 (/etc/adduser.conf).&lt;br /&gt;
    You should never ever create any new system user accounts on the newly installed Cent OS Linux. So above awk command filter out UID according to Linux distro.&lt;br /&gt;
    export UGIDLIMIT=500 - setup UID start limit for normal user account. Set this value as per your Linux distro.&lt;br /&gt;
    awk -v LIMIT=$UGIDLIMIT -F: '($3&amp;gt;=LIMIT) &amp;amp;&amp;amp; ($3!=65534)' /etc/passwd &amp;gt; /root/move/passwd.mig - You need to pass UGIDLIMIT variable to awk using -v option (it assigns value of shell variable UGIDLIMIT to awk program variable LIMIT). Option -F: sets the field separator to : . Finally awk read each line from /etc/passwd, filter out system accounts and generates new file /root/move/passwd.mig. Same logic is applies to rest of awk command.&lt;br /&gt;
    tar -zcvpf /root/move/home.tar.gz /home - Make a backup of users /home dir&lt;br /&gt;
    tar -zcvpf /root/move/mail.tar.gz /var/spool/mail - Make a backup of users mail dir&lt;br /&gt;
&lt;br /&gt;
Use scp or usb pen or tape to copy /root/move to a new Linux system.&lt;br /&gt;
# scp -r /root/move/* user@new.linuxserver.com:/path/to/location&lt;br /&gt;
Commands to type on new Linux system&lt;br /&gt;
&lt;br /&gt;
First, make a backup of current users and passwords:&lt;br /&gt;
# mkdir /root/newsusers.bak&lt;br /&gt;
# cp /etc/passwd /etc/shadow /etc/group /etc/gshadow /root/newsusers.bak&lt;br /&gt;
&lt;br /&gt;
Now restore passwd and other files in /etc/&lt;br /&gt;
# cd /path/to/location&lt;br /&gt;
# cat passwd.mig &amp;gt;&amp;gt; /etc/passwd&lt;br /&gt;
# cat group.mig &amp;gt;&amp;gt; /etc/group&lt;br /&gt;
# cat shadow.mig &amp;gt;&amp;gt; /etc/shadow&lt;br /&gt;
# /bin/cp gshadow.mig /etc/gshadow&lt;br /&gt;
&lt;br /&gt;
Please note that you must use &amp;gt;&amp;gt; (append) and not &amp;gt; (create) shell redirection.&lt;br /&gt;
&lt;br /&gt;
Now copy and extract home.tar.gz to new server /home&lt;br /&gt;
# cd /&lt;br /&gt;
# tar -zxvf /path/to/location/home.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now copy and extract mail.tar.gz (Mails) to new server /var/spool/mail&lt;br /&gt;
# cd /&lt;br /&gt;
# tar -zxvf /path/to/location/mail.tar.gz&lt;br /&gt;
&lt;br /&gt;
Now reboot system; when the Linux comes back, your user accounts will work as they did before on old system:&lt;br /&gt;
# reboot&lt;br /&gt;
&lt;br /&gt;
Please note that if you are new to Linux perform above commands in a sandbox environment. Above technique can be used to UNIX to UNIX OR UNIX to Linux account migration. You need to make couple of changes but overall the concept remains the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Referensi==&lt;br /&gt;
&lt;br /&gt;
* http://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/&lt;/div&gt;</summary>
		<author><name>Onnowpurbo</name></author>
	</entry>
</feed>