- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- .rhost file in users home directories
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 02:22 AM
тАО02-13-2002 02:22 AM
.rhost file in users home directories
I have a need to to allow only a few non root users to rlogin to a host. The users that aren't allowed to rlogin I wish to have a root owned .rhosts file in the users home directory. Trouble is the user if they wish can remove the root owned .rhosts file because it's in a directory they own.
I could add an entry in the .profile to see how the user logged in (different tty types)
Regards
Paul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 02:30 AM
тАО02-13-2002 02:30 AM
Re: .rhost file in users home directories
try
hosts.equiv(4) hosts.equiv(4)
NAME
hosts.equiv, .rhosts - security files authorizing access by remote
hosts and users on local host
DESCRIPTION
The /etc/hosts.equiv file and files named .rhosts found in users' home
directories specify remote hosts and users that are "equivalent" to
the local host or user. Users from equivalent remote hosts are
permitted to access a local account using rcp or remsh or to rlogin to
the local account without supplying a password (see rcp(1), remsh(1),
and rlogin(1)). The security provided by hosts.equiv is implemented
by the ruserok() library routine, (see rcmd(3N)).
In this description, hostequiv means either the system
/etc/hosts.equiv file or the user .rhosts file. Note that .rhosts
must be owned by the user in whose home directory it is found and it
must not be a symbolic link. The /etc/hosts.equiv file defines
system-wide equivalency, whereas a user's .rhosts file defines
equivalency between the local user and any remote users to whom the
local user chooses to allow or deny access.
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 02:37 AM
тАО02-13-2002 02:37 AM
Re: .rhost file in users home directories
from "man rlogind":
... fails, login(1) prompts the user with the normal login sequence. The -l option to rlogind prevents any authentication based on the user's .rhosts file unless the user is logging in as super-user. ....
So if you reconfigure inetd.conf, you could make rlogind only work with /etc/rhosts and /etc/hosts.equiv, it will simply ignore $HOME/.rhosts
Hope this helps
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 03:10 AM
тАО02-13-2002 03:10 AM
Re: .rhost file in users home directories
In fact, since you dont want other users to rlogin to the machine, you should have a policy expressly forbidding any user from having a $HOME/.rhosts file. You may want to run a small script weekly or so, to search for user-created .rhosts files and delete them.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 06:05 AM
тАО02-13-2002 06:05 AM
Re: .rhost file in users home directories
I presume you want to allow rlogin without a password. If not, you don't need to use .rhosts nor /etc/hosts.equiv. I'd also remove the "r" services from /etc/inetd.conf.
You may want to use /var/adm/inetd.sec to limit the IP addresses a service will allow connections from.
When I've used /etc/hosts.equiv, I did chown root:sys and chmod 000 on it.
Darrell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 09:46 AM
тАО02-13-2002 09:46 AM
Re: .rhost file in users home directories
If root creates a .rhost file in my home directory /home/paulw/ preventing me from rlogin/remsh into the box without a password. I as user paulw can remove the .rhost file even though it is created and owned by root.
I understand that I can prevent the use of users .rhost file by editing the inetd.conf file but I want to allow some users to rlogin and other not to. I also cannot be sure of where the user will login from. I.E. the ip address of the remote machine is unknown.
So basically ignoring r-services for a moment.
How can a root user write a file to a users home directory and prevent that user from moving/deleting the file when the directory is owned by that user.
I've tried looking at acl but I think this is just for hfs filesytems.
or am I asking the impossible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 10:27 AM
тАО02-13-2002 10:27 AM
Re: .rhost file in users home directories
You can try secure shell, obtain openssh and the other required pieces (i.e. zlib, perl, etc.) at http://hpux.cs.utah.edu/ in depot format for HP-UX 11 No compile process needed. Just do the whole thing through swinstall. I'd visit the www.openssh.com as well to get some background information. Having said that ssh is not an HP product... !!
other resources:
You can look at SSH Case studies at http://www.unixreview.com/books/book_preview9.shtml for examples of smart SSH usage.
g'd luck
t++
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 11:49 AM
тАО02-13-2002 11:49 AM
Re: .rhost file in users home directories
If you have tcp wrappers enabled, you have better ability to restrict access to the r*. This includes restrictions by user and host.
As noted above ssh (secure shell) may be a better option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-13-2002 11:57 AM
тАО02-13-2002 11:57 AM
Re: .rhost file in users home directories
Darn good answer. Never had tried it.
Darrell