LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 01-13-2008, 06:25 PM   #1
kcarun
Member
 
Registered: Dec 2006
Location: Cochin,INDIA
Distribution: Debian , OpenSolaris,Ubuntu
Posts: 82

Rep: Reputation: 15
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)
 
Old 01-13-2008, 07:05 PM   #2
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Blog Entries: 1

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

Last edited by jrtayloriv; 01-13-2008 at 07:07 PM.
 
Old 01-14-2008, 12:25 AM   #3
kcarun
Member
 
Registered: Dec 2006
Location: Cochin,INDIA
Distribution: Debian , OpenSolaris,Ubuntu
Posts: 82

Original Poster
Rep: Reputation: 15
Thanks for your response,,

So the Correct answer is only (a) ?

reg
Arun
 
Old 01-14-2008, 11:07 AM   #4
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Blog Entries: 1

Rep: Reputation: 44
Yes -- since it says "specified user" -- the answer is (a).
 
Old 01-14-2008, 11:35 PM   #5
kcarun
Member
 
Registered: Dec 2006
Location: Cochin,INDIA
Distribution: Debian , OpenSolaris,Ubuntu
Posts: 82

Original Poster
Rep: Reputation: 15
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
 
Old 01-15-2008, 02:44 AM   #6
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 366
Blog Entries: 1

Rep: Reputation: 44
google = your friend

http://www.google.com/search?hl=en&q...=Google+Search
 
Old 01-15-2008, 05:41 AM   #7
javier.e.menendez
Member
 
Registered: Jan 2006
Posts: 168

Rep: Reputation: 30
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)
 
Old 01-16-2008, 11:37 PM   #8
kcarun
Member
 
Registered: Dec 2006
Location: Cochin,INDIA
Distribution: Debian , OpenSolaris,Ubuntu
Posts: 82

Original Poster
Rep: Reputation: 15
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
 
Old 01-22-2008, 05:41 AM   #9
toshiro
LQ Newbie
 
Registered: Jan 2003
Distribution: Debian, Ubuntu, Solaris
Posts: 24

Rep: Reputation: 0
Quote:
Originally Posted by kcarun View Post
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,
 
Old 01-22-2008, 07:03 AM   #10
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
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.
 
Old 01-22-2008, 09:37 AM   #11
kcarun
Member
 
Registered: Dec 2006
Location: Cochin,INDIA
Distribution: Debian , OpenSolaris,Ubuntu
Posts: 82

Original Poster
Rep: Reputation: 15
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
 
Old 07-09-2009, 01:50 AM   #12
naw_deepak
Member
 
Registered: Aug 2008
Posts: 35

Rep: Reputation: 15
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
 
Old 07-09-2009, 01:52 AM   #13
naw_deepak
Member
 
Registered: Aug 2008
Posts: 35

Rep: Reputation: 15
One more thing,

When I edit both files, should I use rlogin to access the machine from trusted hosts?
 
Old 07-09-2009, 02:19 AM   #14
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
Quote:
Originally Posted by naw_deepak View Post
How to make remote login possible without inputting password?
Use ssh and public keys. Rlogin shouldn't be used.
 
Old 08-03-2009, 12:23 PM   #15
Bill Morita
LQ Newbie
 
Registered: Oct 2007
Posts: 3

Rep: Reputation: 0
Thumbs up 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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
LXer: Displaying "MyComputer", "Trash", "Network Servers" Icons On A GNOME Desktop LXer Syndicated Linux News 0 04-02-2007 08:31 AM
Can you explain the difference between "Free Software (GNU)" and "Open Source"? vharishankar General 5 03-03-2005 09:40 AM
difference between "Web server local URL" and "IPv4 address"? kpachopoulos Linux - General 2 09-17-2004 01:30 PM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 10:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration