Migrating user accounts can be very troublesome when you have a large numbers of users. So, is always recommend to deploy active directory or LDAP.
If your organization didn't deploy centralized user database like AD & LDAP and have large portion of users needed to transfer from Old server to the new one. Don't worry, you don't need to manually key in all the records 1-by-1, there's always a faster way to achieve this by using script.
I have written 2 perl scripts to perform the migration.
- [download#3] (run in old server) - migrate user accounts from old server and generate a library with all the captured user data.
- [download#5] (run in new server) - include the library generated by migrate_passwd.pl and add all the user_account to the new server.
Steps:
1) Download migrate_passwd.pl in the old server and run it
./migrate_passwd.pl /etc/passwd /tmp/accounts.pm
2) Then copy the /tmp/accounts.pm to the new server (put this file into the same directory of serversetup.pl)
3) Download serversetup.pl in the new server and run it
./serversetup.pl
4) Done
on October 22, 2008 at 10:39 PM
you are good programmer, and thanks for sharing, but i don't really need it~
hahaha
on October 22, 2008 at 11:23 PM
Who knows 1 day you might need it, haha..
Post a Comment