migrate users from old system

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

migrate users from old system

Markus Rosjat
hi all,


what is the right way to do a migration of users from one system to
another? I did the following but it seems to get some problems with
permissions on the files and directories.

1. copy passwd, group, master.passwd to new machine

2. clean up files (some users doent exist anymore)

3. use pwd_mkdb to create a new db

this gave no errors but after migrating some files with rsync to the new
machine it seems that some directories not read- /writeable (for example
by openLDAP) even all the permissions are set correct.

So I wonder if it might has to do with the user accounts themself. Any
advice would be helpful.

Regards

--
Markus Rosjat    fon: +49 351 8107224    mail: [hidden email]

G+H Webservice GbR Gorzolla, Herrmann
Königsbrücker Str. 70, 01099 Dresden

http://www.ghweb.de
fon: +49 351 8107220   fax: +49 351 8107227

Bitte prüfen Sie, ob diese Mail wirklich ausgedruckt werden muss! Before you print it, think about your responsibility and commitment to the ENVIRONMENT

Reply | Threaded
Open this post in threaded view
|

Re: migrate users from old system

Nick Holland
On 10/16/18 10:39, Markus Rosjat wrote:
> hi all,
>
>
> what is the right way to do a migration of users from one system to
> another? I did the following but it seems to get some problems with
> permissions on the files and directories.
>
> 1. copy passwd, group, master.passwd to new machine

yep.

> 2. clean up files (some users doent exist anymore)

how did you do this?

>
> 3. use pwd_mkdb to create a new db

IF you use vipw to remove users that no longer exist, when you exit, it
will sync everything for you.  If not, make a token edit with vipw, then
save it.

> this gave no errors but after migrating some files with rsync to the new
> machine it seems that some directories not read- /writeable (for example
> by openLDAP) even all the permissions are set correct.

If you rsync through an intermediary machines, i.e., an rsync backup
system, make sure you use the --numeric-ids option, otherwise, it will
try to sync the names (rather than numeric IDs) of the things it can --
and totally scramble the things it can't.

If you are going directly from the old machine to the new machine, make
sure you copy over the passwd, master.passwd and group files first.

Also -- assuming there was an OS upgrade, copying over the user and
group files just broke all new system users, so re-run sysmerge.

Nick.