How to preserve users in new install?

Peter Boy pboy at barkhof.uni-bremen.de
Mon May 31 06:50:19 UTC 2004


Am Mo, den 31.05.2004 schrieb romildo at uber.com.br um 04:53:
> Is it enough to backup /etc/{group,passwd,shadow} and
> /home/* before installation, and restore them afterwards?
> Will the users will be back and functional after that?

That should do it. But don't forget gshadow. I did it several times on
Linux and other Unices. Instead of overwriting the passwd, shadow,....
made by the installation you should use an editor to add the lines of
the old passwd, shadow,...., referring to your users, to the new one.
Sometimes some new system users are added (or before you overwrite you
should compare for new system users - but if I remember correctly there
are none in FC2).


Switching to another distro, as others suggested, may not be as easy.
Some start with different UID (e.g. Fedora starts with 500, Mandrake
with 501, SuSE with 1000). It depends on the distro's usage of the
number space below those starting values wether you have to make
adjustments or not.


Peter







More information about the users mailing list