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.

Reply via email to