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
appreciat ur help
Thanks and regards
simon
-----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
Hi all
First copy /etc/passwd and /etc/shadow to /tmp of new server
Second go to /tmp of new server
Third, run this script "sh users.sh"
awk -F: '$3>500 {print $1":"$4":"$5":"$6":"$7}' passwd > archivo1 for u in $(cat archivo1 | cut -f 1 -d:); do GROUP1=$(egrep $u: -a archivo1 | cut -f 2 -d:) CMT1=$(egrep $u: -a archivo1 | cut -f 3 -d:) HOME1=$(egrep $u: -a archivo1 | cut -f 4 -d:) SHELL1=$(egrep $u: -a archivo1 | cut -f 5 -d:) useradd -g $GROUP1 -c "$CMT1" -d $HOME1 -s $SHELL1 $u PASSWD=$(egrep $u: -a shadow | cut -f 2 -d:) usermod -p $PASSWD $u done rm -f archivo1
Jose Albornoz
-----Mensaje original----- De: centos-bounces@centos.org [mailto:centos-bounces@centos.org] En nombre de Barry L. Kline Enviado el: Martes, 24 de Julio de 2007 1:47 p.m. Para: CentOS mailing list Asunto: Re: [CentOS] migrating users from linux to centos
-----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
_______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Tue, 2007-07-24 at 14:46 -0400, Barry L. Kline wrote:
-----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.
For me: comm -3 <new box pw file> <old box pw file> >/tmp/new_vs_old_pw provides less work and reduces the chance of missing something, like "system" UIDs difference that may be needed. Then vim the output and drp undesired entries and leading tabs.
If you are confident/don't care about "system" entries diffs, you can add 1 to the parameter to just give all the entries from the "old" box.
Barry
<snip sig stuff>
-- Bill
On 24/07/07, simon mailadmin@baladia.gov.kw wrote:
i have about existing 100 mail users
It looks like you should really seriously think about hosting mails using virtual domains. If you use virtual domains, you can just copy /etc/shadow to the new machine and tell Cyrus/Courier/[whatever] to use PAM to authenticate with the shadow file. Refer to howtoforge.com for details on virtual domain.
If you are going to go ahead with the /etc/{password,shadow,group} route, then you also gotta make sure /home/* has the right UID/GID.