Solaris / OpenSolarisThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(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?
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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.
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.
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789
Rep:
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.