[CentOS] migrating users from linux to centos
Barry L. Kline
blkline at attglobal.net
Tue Jul 24 18:46:35 UTC 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
simon wrote:
> Dear All,
>
> I have been running linux 9 server as a dns and mail server and is workin
> fine..
>
> i want to install CENTOS 5 with all the latest mail server software and
> bind as well as all the libraries on another machine whic is already done
>
> also the data is backed up and will be tranferred.
>
>
> but i would like to know
>
> i have about existing 100 mail users
>
> how could i tranfer these usernames and passwrd to the new CENtos 5 server ..
>
> if i copy the /etc/passwd from my linux server it gonna overite my centos5
> /etc/passwd file as there r new users n also new groups create when i
> installed centos5 n software
> also i see that the /etc/shadow has only read permisson for root so cant
> be over written
>
> is there a way i cd possiblly have the existing users with thier password
> on centos5 so i dont have to ask them for their passwords n create all
> users again
>
Create copies of /etc/{passwd,shadow,group} from the original system.
Edit the copies to EXCLUDE existing user/groups.
Append the remaining entries to the existing file.
e.g.:
cp /etc/passwd /etc/passwd.old # from the old system
vim passwd.old (and edit out the existing entries)
copy passwd.old to the new system
cat passwd.old >> /etc/passwd (notice the '>>')
Repeat for group & shadow.
Barry
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
iD8DBQFGpkkLCFu3bIiwtTARAmBqAJ9vr7WLzUbHsTVlfjQOHNgkxY5o8QCgm7UE
gwploWjfp54KlMQ1OF7rkYQ=
=NMBd
-----END PGP SIGNATURE-----
More information about the CentOS
mailing list