[41] in Hesiod
hesiod mailing list
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Fri Jan 4 16:46:57 1991
Date: Fri, 4 Jan 91 16:42:18 -0500
From: Mark Rosenstein <mar@MIT.EDU>
To: bloom-beacon!think!ames!xtort.pyramid.com!mfrost
Cc: hesiod@ATHENA.MIT.EDU
In-Reply-To: Mark Frost's message of Thu, 3 Jan 91 21:37:44 -0800 <9101040537.AA25332@xtort.pyramid.com.pyramid.com>
Yes, you are on the hesiod list. There just hasn't been any traffic
in the last 6 months or so. Mainly because people keep asking
questions via hesiod-request instead of on the list.
We aren't currently working on putting together hesiod applications
for export, but I can describe what we do here, and may be able to get
you source to some of this if you are interested.
One approach which was discussed here when hesiod was being developed
was to replace routines in the C library with routines that use
hesiod. Candidates for this would be getpwent(), getgrent(),
getgrgid(), getgrnam(), getpwnam(), getpwuid(), getservent(),
getservbyname(), etc. We actually have a library that does this, but
did not replace the standard routines because some programs (notably
those utilities used in /etc/rc to bring the machine up and those that
would be used to debug problems) must work when the network isn't up.
This is also a problem because we run some third party software we
don't have source to that has to be able to get information as well.
The scheme we decided on is that login looks people up via hesiod, and
then modifies /etc/passwd and /etc/group to put in all relevant
entries when someone logs in. So our standard password file has only
a few entries for root, daemon, nobody, etc. and all other entries are
added as needed. Out workstations perform a cleanup when no one is
logged in, and part of this cleanup is to remove unneeded password
entries.
This solves the problem in most cases since you generally only want to
know about people who are logged in. Looking a file ownership is the
primary case where you need to lookup users who may not be logged in,
and we have modified /bin/ls to optionally use hesiod to map user and
group names if the right flag is specified. Another area where we
have modified a utility is in lpr and lpq, which now use hesiod to
look for the printcap entry. But lpd does not, so that the detailed
entry describing the actual printer is local to the print server,
while all of the client workstations only receive a short printcap
entry via hesiod instructing them which machine to spool the job to.
Many of the programs which use hesiod are not standard unix utilities,
but systems written at Athena such as attach, zephyr, and moira.
Hesiod is also sometimes used in shell scripts through the hesinfo
command.
-Mark