atray
08-29-2001, 10:42 AM
I need to take all user accounts from a Debian 2.2 box and add them all to a RedHat 7 box. is there any way of doing this short of retyping them all?
TIA,
TIA,
|
Click to See Complete Forum and Search --> : Exporting User Database from Debian to RedHat atray 08-29-2001, 10:42 AM I need to take all user accounts from a Debian 2.2 box and add them all to a RedHat 7 box. is there any way of doing this short of retyping them all? TIA, Craig McPherson 08-29-2001, 03:38 PM Save copies of the following files: /etc/passwd /etc/shadow /etc/group /etc/gshadow I'll assume you'll copy them onto the new system as /etc/passwd.backup and so forth. On the new system, do NOT just copy the old files over the new files. System accounts and groups will be different, so you only want to copy users that you personally have created. Open up your backup copies of the shadow and passwd files in a text editor, and delete all the system accounts, leaving only the accounts of human users that you've created. Then integrate those into the main password files like this: cat /etc/passwd.backup >> /etc/passwd cat /etc/shadow.backup >> /etc/shadow Make sure you use ">>" and not ">" Now that you've merged all your users into the system password files, open /etc/passwd and /etc/shadow, and sanity check. Make sure you don't have any conflicting user IDs. If you do, change them. Make sure everyone is in the group you want them to be in. Make sure everybody's home directory is properly recreated or restored. Delete the backup files or at least make sure they're not world-readable. It should take 3 minutes at most. justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |