Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Move users from old system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
JohnnyGTO
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 91

PostPosted: Mon Sep 23, 2002 3:07 pm    Post subject: Move users from old system Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20588

PostPosted: Mon Sep 23, 2002 4:17 pm    Post subject: Reply with quote

/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
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Mon Sep 23, 2002 4:26 pm    Post subject: Reply with quote

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
View user's profile Send private message
JohnnyGTO
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 91

PostPosted: Mon Sep 23, 2002 6:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Mon Sep 23, 2002 6:45 pm    Post subject: editting shadow passwd files Reply with quote

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
View user's profile Send private message
JohnnyGTO
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2002
Posts: 91

PostPosted: Mon Sep 23, 2002 6:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
kashani
Advocate
Advocate


Joined: 02 Sep 2002
Posts: 2032
Location: San Francisco

PostPosted: Mon Sep 23, 2002 9:22 pm    Post subject: who shot bob crane? Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum