Hesiod is a simple string lookup service built on top of the Domain Name System. Conceptually, the service translates a pair of strings (the "name" and "type") into a set of result strings. This lookup is done very simply; a DNS lookup is done for name.type.ns.athena.mit.edu and the strings in the resulting TXT records are returned.
Hesiod is used in several places in Debathena:
- Retrieving a user's entries in the passwd and group databases
- Due to DNS limitations, the group list is often truncated. A group must be marked as an "NFS Group" in order for group membership to be propagated to Hesiod.
- Determining which mail system they're using and if IMAP, which server to speak to
- Translating a locker name to an AFS path, including the user's homedir
- Determining a workstation's "cluster" information, including whether or not the workstation is designated as a "public" cluster machine, whether it pulls from the production APT repo or the development/proposed repos
- Determining service information (port/protocol pairs)
- Determining servers for a specific service
Hesiod may, in some cases, be used to select a default printer for a specific workstation. This information is ignored in the public cluster environment.
Hesiod can be queried with the hesinfo command.
$ hesinfo jdreed passwd jdreed:*:7263:101:Jonathan D Reed,E17-110A,6172530657,:/mit/jdreed:/bin/athena/bash
Because NSS uses a Hesiod backend, you can accomplish the same thing with getent(1) (assuming there is not already a local user with the same name).
$ getent passwd jdreed jdreed:*:7263:101:Jonathan D Reed,E17-110A,6172530657,:/mit/jdreed:/bin/athena/bash
The hes command in the consult locker takes a Hesiod name and iterates over all possible Hesiod types.
$ add consult $ hes jdreed PASSWD: jdreed:*:7263:101:Jonathan D Reed,E17-110A,6172530657,:/mit/jdreed:/bin/athena/bash FILSYS: AFS /afs/athena.mit.edu/user/j/d/jdreed w /mit/jdreed POBOX: POP PO14.MIT.EDU jdreed GRPLIST: docsourc:2567:hdops:80547:bugs-acl:967:webmeet-adm:26990:ctug-admin:23752:facdev:14008:chd-home:27063:gsipb:15001:tooltime-acl:18546:cvs-users:18719:tooltime-team:26355:minidev:691:is-archive:29512:is-www:26481:olcdev:367:mcc-www:9235:helpstaff:16886: $ hes zephyr FILSYS: AFS /afs/athena.mit.edu/astaff/project/zephyr w /mit/zephyr SLOC: ARILINN.MIT.EDU SLOC: NESKAYA.MIT.EDU SERVICE: zephyr udp 2102