<-Back

Users creation

If you have to move users from a server to an other server, think they must keep the same UID/GID. This can be very tricky. I remember the time when Linux went from first user as UID 500 to first user as UID 1000...

The simple way is to copy the /etc/passwd, group and shadow files. Honestly I never tried to do so. I have little users (never more than a handfull), so it's easy to re-create them by hand. One only have to write down the UID/GID before losing access to the old server.

You can also copy/paste the relevant part of the passwd and shadow files and the /home - this let the system "fake" users untouched. Be cautious!

Moving

This time, I have some more users. What I did is control the uid/gid didn't change between openSUSE versions, copy the user part of /etc/passwd from the old passwd file to the new one (not changing the system users), doing the same for /etc/shadow and copying the old /home to the new one with cp -a or rsync -a to keep the uid/gid. No problem so far.

In dodin.org/home, do:

 rsync -av dodin.org:/home/ .

Do not forget the final dot. The / after home mean: do not copy "home", but the home content.

Data move

Same for data move, rsync the old data in the new folder. Eventually use a symlink on the new server if the place is not the same.