LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   What is the difference between "/etc/hosts.equiv" AND ".rhosts" ? (https://www.linuxquestions.org/questions/solaris-opensolaris-20/what-is-the-difference-between-etc-hosts-equiv-and-rhosts-613349/)

kcarun 01-13-2008 06:25 PM

What is the difference between "/etc/hosts.equiv" AND ".rhosts" ?
 
Hi Friends,

I am preparing for SUN certification. In my text book in review section there is a question,

Q)Which of the following files gives a specified user permission to log in remotely from the specified host without having to supply a password?

a) .rhosts
b) /etc/hosts.equiv
c) /etc/default/login
d)/etc/hosts

1) Answer is shown as option 'a' , But 'b' is also correct?
2) these 2 files are using for same purpose ?

Kindly advice

reg
Arun(INDIA)

jrtayloriv 01-13-2008 07:05 PM

/etc/hosts.equiv is system-wide and applies to everyone, while .rhosts is specific to the user (and is stored in their home directory)

kcarun 01-14-2008 12:25 AM

Thanks for your response,,

So the Correct answer is only (a) ?

reg
Arun

jrtayloriv 01-14-2008 11:07 AM

Yes -- since it says "specified user" -- the answer is (a).

kcarun 01-14-2008 11:35 PM

Thanks now it is very clear for me.

One More Doubt.

So A user can give access to others by doing appropriate changes in ".rhosts" file with out the permission of Administrator ?

reg
ARUN

jrtayloriv 01-15-2008 02:44 AM

google = your friend
 
http://www.google.com/search?hl=en&q...=Google+Search

javier.e.menendez 01-15-2008 05:41 AM

Kcarun:

.rhosts can be edited by either root or a regular user in their own home directories. /etc/hosts.equiv can only be edited for root but it applies to users only.

Examples:

root on server1 wants to allow root on server2 to log into server1 as root

echo server2 >> /.rhosts

root on server1 wants root from anywhere to log in as root from any other machine (really stupid)

echo + >> /.rhosts

root on server1 wants paul to log in as root from server2 (with the -l option)

echo server2 paul >> /.rhosts

root on server1 wants to allow john and paul to log in as themselves (basically any users that exist on both machines but not root) from server2 into server1

echo server2 >> /etc/hosts.equiv

john on server1 wants john to log in as himself from server2

echo server2 >> /export/home/john/.rhosts

john on server1 wants paul to log in as john from server2

echo server2 paul >> /export/home/john/.rhosts

Well, you get the idea (I hope)

kcarun 01-16-2008 11:37 PM

Thank you friends for your response..


I am a newbie in Solaris, I searched for the two files "/etc/hosts.equiv " and "/.rhosts" But it is not there.

At the time of Installation (Solaris Express) I choose "CORE " Option.

SO in core option these files will not be available OR Networking is not possible?

reg
Arun

toshiro 01-22-2008 05:41 AM

Quote:

Originally Posted by kcarun (Post 3025340)
Thank you friends for your response..

I am a newbie in Solaris, I searched for the two files "/etc/hosts.equiv " and "/.rhosts" But it is not there.

At the time of Installation (Solaris Express) I choose "CORE " Option.

SO in core option these files will not be available OR Networking is not possible?

reg
Arun

CORE only provides you a very limited Solaris environment, unless you have very little disk space, you should install using the FULL option.

As a side note, using .rhosts is a security risk, so it's use is not recommended, use something more secure like ssh.

Regards,

jlliagre 01-22-2008 07:03 AM

Networking is possible even with the CORE cluster installed.
These two files aren't required for the rlogin service to work so aren't installed by default.

Anyway, they shouldn't be created for security reasons as already stated.

kcarun 01-22-2008 09:37 AM

Thaks for solving my queries !!!!
 
Hi Friends , thaks to all , For last few days ,I was not able to check the responses due to unavailability of net access .

Anyway I decided to reinstall my OS , I need all your helps in future.

Thanking once again

reg
Arun_India

naw_deepak 07-09-2009 01:50 AM

Hi all,

I created both files and input the entries for trusted hosts. But when I try to login from remote system, it keeps asking for password. It only takes root password. How to make remote login possible without inputting password?

Thanks,
Deepak

naw_deepak 07-09-2009 01:52 AM

One more thing,

When I edit both files, should I use rlogin to access the machine from trusted hosts?

jlliagre 07-09-2009 02:19 AM

Quote:

Originally Posted by naw_deepak (Post 3601831)
How to make remote login possible without inputting password?

Use ssh and public keys. Rlogin shouldn't be used.

Bill Morita 08-03-2009 12:23 PM

Use ssh by generating keys with ssh-keygen
 
Start on your original system (system A).
Run ssh-keygen (note this should be run just once per system).
Just hit enter to all querys.
You now have a directory ~/.ssh that contains a file id_rsa.pub .
Login to the system you want to have the access to (system B).
Run ssh-keygen (if needed)
Copy (suggest scp) the file id_rsa.pub from system A to system B.
If the file ~/.ssh/authorized_keys does not exist, create it using "touch" and set the mode to 600 with "chmod".
Append the contents of id_rsa.pub to ~/.ssh/authorized_keys

You should now be able from system A do a ssh system_B with no pw.
You can now also do an scp from A to B (don't forget the ":").

good luck


All times are GMT -5. The time now is 02:18 AM.