PAM_RHOSTS(8)
๐ PAM_RHOSTS โ the rhosts PAM module ๐
okay bestie, gather round, we're doing a <rainbow>Linux-PAM manual page</rainbow> today and this one is so old-school it practically smells like a server room. it's the manual page for pam_rhosts from <purple>Linux-PAM</purple>, and yes we're gonna read the whole thing together. no skimming. i will know. ๐
โจ NAME โจ
pam_rhosts โ the rhosts PAM module ๐
โจ SYNOPSIS โจ
pam_rhosts.so
that's it. that's the whole synopsis. she's lowkey minimal, she's highkey iconic. ๐
โจ DESCRIPTION โจ
okay so this module does the standard network authentication for services โ you know, the whole classic vibe used by traditional implementations of rlogin and rsh etc. ๐ฆ
the way this authentication mechanism works is it's based on the contents of two files: /etc/hosts.equiv and ~/.rhosts. let's break it down, bestie:
- First off, hosts listed in
/etc/hosts.equivare treated as equivalent to the localhost. like, "you're basically us now, come in." ๐ซถ - Secondly, entries in the user's own copy of
~/.rhostsare used to map "remote-host remote-user" pairs to that user's account on the current host.
access gets granted to the user if:
- their host is present in
/etc/hosts.equivand their remote account is identical to their local one, or - their remote account has an entry in their personal configuration file.
periodt. ๐
now, the module authenticates a remote user (internally specified by the item PAM_RUSER) connecting from the remote host (internally specified by the item PAM_RHOST). and this is the important part, so listen up bestie: for applications to be compatible with this authentication module, they must set these items prior to calling pam_authenticate(). ๐จ
not me being dramatic but: the module is not capable of independently probing the network connection for such information. it cannot do that. it will not do that. it's simply not that girl. ๐
โจ OPTIONS โจ
here's the lil menu of things you can pass her, ngl it's a short one and we love that for her:
debugโ Print debug information. (she's telling you everything, oversharing era ๐)silentโ Don't print informative messages. (the opposite vibe, mysterious, quiet, lowkey ๐)superuser=accountโ Handle account as root. ๐
โจ MODULE TYPES PROVIDED โจ
Only the auth module type is provided. one type. that's the whole roster. she's specialized, she's focused, she's not trying to be everything to everyone. ๐ธ
โจ RETURN VALUES โจ
here's what she can hand back to you when things go sideways:
PAM_AUTH_ERRโ The remote host, remote user name or the local user name couldn't be determined, or access was denied by the.rhostsfile. ๐ญ (something's missing or you got told no)PAM_USER_UNKNOWNโ User is not known to system. ๐ (the system literally does not know this person)
โจ EXAMPLES โจ
okay so say you wanna grant a remote user access by /etc/hosts.equiv or .rhosts for rsh โ you'd add the following lines to /etc/pam.d/rsh:
#%PAM-1.0
#
auth required pam_rhosts.so
auth required pam_nologin.so
auth required pam_env.so
auth required pam_unix.so
copy it exactly, bestie, don't get creative with the spacing, i'm begging. ๐
โจ SEE ALSO โจ
go read these next, the girls that read together stay together:
rootok(3)hosts.equiv(5)rhosts(5)pam.conf(5)pam.d(5)pam(8)
โจ AUTHOR โจ
pam_rhosts was written by Thorsten Kukuk <kukuk@thkukuk.de> โ thank you king, we appreciate you ๐ซถ๐
and that's the whole page, bestie!! this was <hotpink>Linux-PAM</hotpink>'s PAM_RHOSTS(8), dated 09/27/2026 โ yeah that date is giving time traveler but we don't question the versioning, we just respect it. ๐โจ mwah, go secure your rsh configs responsibly, ily, bye!! ๐๐ฆ๐
๐ฆ where this page comes from
- arch rolling: pam 1.7.3-1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms