Operating System - Linux
1753797 Members
8695 Online
108805 Solutions
New Discussion юеВ

Copyied /etc/passwd file from server 1 to server 2 but unable to login to server 2 with perticular u

 
Rohit Nagare
Frequent Advisor

Copyied /etc/passwd file from server 1 to server 2 but unable to login to server 2 with perticular u

Hi,
Good Morning.
I have two Redhat 4 Linux servers (64 bit)
The server 2 is newly Redhat 4 linux (64 bit)installed. I have copyed /etc/passwd file from server 1 to server 2. But unable to login with perticular user on server 2 (login id rohit).
error message as

login as: rohit
rohit@10.20.4.18's password:
Access denied


Thanks & Regards
Rohit Nagare
4 REPLIES 4
Goran┬аKoruga
Honored Contributor

Re: Copyied /etc/passwd file from server 1 to server 2 but unable to login to server 2 with perticular u

Hello.

Are you saying your system doesn't use shadow passwords?

Regards,
Goran
Rohit Nagare
Frequent Advisor

Re: Copyied /etc/passwd file from server 1 to server 2 but unable to login to server 2 with perticular u

Hi Goran,
Thanks for the replay.

I have should i copy shadow file and gshado file on /etc of the server 2.


Regards
Rohit
Ivan Ferreira
Honored Contributor

Re: Copyied /etc/passwd file from server 1 to server 2 but unable to login to server 2 with perticular u

You should not replace the files, you should only copy the content of the file that you are interested to replicate, and ensure that you don't have any duplicate UIDs.

If you are sure, and you want to replace the files, you should copy passwd, shadow and group files.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Nuwan Alwis
Valued Contributor

Re: Copyied /etc/passwd file from server 1 to server 2 but unable to login to server 2 with perticular u

Hi Rohit,
My question woud be why you want to such a thing.
If you are tring to achive single login to both systems you could have implemented public/private key auth via ssh.
Any way as above post said never over write these files because it will over ride the permission aswell.
Over write contain would be the best and safe way.
Yes, you need passwd group and related shadow files to make things working.

Good Luck...!
NJ