View previous topic :: View next topic |
Author |
Message |
JohnnyGTO Tux's lil' helper
Joined: 20 Apr 2002 Posts: 91
|
Posted: Mon Sep 23, 2002 3:07 pm Post subject: Move users from old system |
|
|
I have a system with mandrake on 2 hard disks, I have a third which now boots Gentoo 1.4rc1. I can mount the older two under the Gentoo system.
What is the fastest cleanest way to move users and maintain their uin, passwords and /home directories off the older disks?
What I would like to do is have a nice clean migration so no one see's any diffence and I end up with a cleaner, leaner OS. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20588
|
Posted: Mon Sep 23, 2002 4:17 pm Post subject: |
|
|
/etc/passwd defines user IDs and /etc/group defines group IDs. Basically, the info on the Gentoo system would have to match the others systems for this to work 'easily'. RH Box, uid 200 = Joe Blow, then have the Gentoo box recognize him the same way.
Of course, you could just add new users and chown/chgrp their files, but that is a bit more involved. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
Naan Yaar Bodhisattva
Joined: 27 Jun 2002 Posts: 1549
|
Posted: Mon Sep 23, 2002 4:26 pm Post subject: |
|
|
In my case, I cut and paste "user" portions of /etc/passwd, /etc/shadow, and /etc/group from the RedHat installation to the Gentoo one to sync them up. They typically are towards the end of the relevant files. IIRC, RedHat starts its user numbering from 500 and creates individual groups for each user with the group name being the same as username. These can be brought over intact to Gentoo. |
|
Back to top |
|
|
JohnnyGTO Tux's lil' helper
Joined: 20 Apr 2002 Posts: 91
|
Posted: Mon Sep 23, 2002 6:40 pm Post subject: |
|
|
So if I merge the user/group data of interest and then copy /home /var/spool/mail /what ever else the ownership should remain intact.
Do I need to recreate passwords if we are using shadowed passwords ? |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Mon Sep 23, 2002 6:45 pm Post subject: editting shadow passwd files |
|
|
JohnnyGTO wrote: |
Do I need to recreate passwords if we are using shadowed passwords ? |
I haven't had a problem cutting and pasting password hashes from the shadow file into the same on another server. It's always best to run the pwconv command after editting the /etc/passwd or /etc/shadow files directly.
see man pwconv for more info.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
JohnnyGTO Tux's lil' helper
Joined: 20 Apr 2002 Posts: 91
|
Posted: Mon Sep 23, 2002 6:59 pm Post subject: |
|
|
Thanks I will try this and write up the results
BTW interesting choice of avitars - he met his end not far from here under some rather strange circumstances. |
|
Back to top |
|
|
kashani Advocate
Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Mon Sep 23, 2002 9:22 pm Post subject: who shot bob crane? |
|
|
JohnnyGTO wrote: |
BTW interesting choice of avitars - he met his end not far from here under some rather strange circumstances. |
Someone mentioned the same thing to me recently. If only I had know when I was in Scotsdale a few years ago for a network conference. I could have organized the outing to the hotel instead of dragging 12 computer geeks to a biker bar with me.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
|
|