LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-18-2005, 10:17 PM   #1
pymehta
Member
 
Registered: Jan 2004
Posts: 54

Rep: Reputation: 15
solaris 9 rsh and /etc/hosts.equiv


Hello!

(1) While using rsh on solaris 9, it works fine with a .rhosts file in home directory of each user. Now, if the .rhosts file is moved to /etc/hosts.equiv, it stops logging in without password. The question is: how to setups system wide host list for access without password? My current file looks like following:
node1.fullname.dom
node2.fullname.dom
node3.fullname.dom
...

(2) I have overwritten /bin/sh with /bin/bash to make bash default shell. This works fine, but when I use rsh to login, the shell only processes $HOME/.bashrc as described in the manual. I have some system wide setup in /etc/profile, which I want to call. If I put a 'source /etc/profile' in .bashrc, then It may be called twice when bash is used without rsh. How to detect that bash is spanwned from rsh?

Thanks,
pymehta
 
Old 01-19-2005, 01:34 AM   #2
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
1) hosts.equiv entries should contain the remote hosts names as they look like when resolved by the server, I guess you should remove the domain parts to fix the problem.

2) replacing a file belonging to the O/S by another one is definitely risky and I would never recommend doing it that way.
Why not setting bash as login shell for the users wanting/needing it ?

Concerning you profile issue, the simplest way would be to set a flag (a variable) in your profile, and source it in bashrc only if the flag is missing.
 
Old 01-19-2005, 06:12 AM   #3
pymehta
Member
 
Registered: Jan 2004
Posts: 54

Original Poster
Rep: Reputation: 15
Thanks for the reply.

1) I have tried with domain names removed but no gain. Also, the rsh document says that the entry containing only the hostname is valid in both .rhosts and /etc/hosts.equiv. I checked the name with command 'who am i', which gave the full name with domain. If this name works for the .rhosts, that why not for /etc/hosts.equiv?

2) The bash I have overwritten came with solaris installation only. I wanted transparent substitution as the users are non-technical type and they will (learn and)use what is provided to them. Due to the same reason, I want to keep the modifications to the .bashrc minimal. This can be done in many ways, but I wanted to know if there is a neat way of doing it by detecting that shell is invoked remotely somehow.

Thanks,
pymehta

Last edited by pymehta; 01-19-2005 at 06:15 AM.
 
Old 01-19-2005, 11:07 AM   #4
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
1) hosts.equiv entries work for me the same .rhosts do. It must be something else. You can snoop incoming rsh traffic to see what is exchanged at the network level. You can also "truss -f" inetd to check if hosts.equiv is read by rshd.
Anyway, enabling no password login through .rhosts or hosts.equiv is definitely creating a high security risk, I would suggest you to explore the ssh alternative.

2) bash is not a /bin/sh drop-in replacement.
From the BUGS bash manual page paragraph:
There are some subtle differences between bash and traditional versions of sh, mostly because of the POSIX specification.
Changing /bin/sh implies that all system shell scripts will actually be run by bash. I'm pretty sure this is breaking your support contract, assuming you have one. Moreover, applying a patch or an upgrade may silently overwrite your bash binary.
If you want your user's having bash as login shell, just replace /bin/sh by /bin/bash for their entries in the /etc/passwd file (or use the "passwd -e" command)
 
  


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
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 03:51 PM
RSH: remuser too long error when rsh is executed from IIS dev33445 Programming 0 08-29-2005 09:34 AM
hosts.allow & hosts.deny question... jonc Linux - Security 9 03-05-2005 09:41 PM
rsh/ssh from Linux to Solaris sttaft Solaris / OpenSolaris 7 06-16-2004 06:14 AM
Adding shell commands to hosts.deny and hosts.allow ridertech Linux - Security 3 12-29-2003 03:52 PM

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

All times are GMT -5. The time now is 01:36 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