[73] in Hesiod

home help back first fref pref prev next nref lref last post

Re: How do I use hesiod efficiently?

daemon@ATHENA.MIT.EDU (Randall Winchester)
Mon Dec 23 15:40:40 1991

Date: Mon, 23 Dec 91 15:37:53 -0500
From: rsw@eng.umd.edu (Randall Winchester)
To: jh@efd.lth.se, hesiod@Athena.MIT.EDU
In-Reply-To: Mail from 'jh@efd.lth.se (Joergen Haegg)'

> From jh@baal.efd.lth.se Sun Dec 22 07:46:01 1991
> X-Mailer: Mail User's Shell (7.2.1 12/20/90)
> To: hesiod@Athena.MIT.EDU
> Subject: How do I use hesiod efficiently?
> 
> I've unpacked and installed Hesiod version 1.3 (I think :-).
> That's what I found in hesiod.c,v.
I would suggest using the BIND 4.8.3 code along with the patches that
tytso@ATHENA.MIT.EDU put out for ftp on some server other than athena-dist.
I can not remember what its name was, but I still have them and can put 
them up for ftp if people want/Ted does not remind us where he put them.

Then just use the libhes.a and hesinfo parts of the MIT Distribution.
> 
> Anyway, are there more libraryfunctions available?
> If I would like to use hesiod instead of yp, then I must
> write a number of getpw and getgr functions myself.
> Only getpwnam is defined in the distribution.

Others have answered on this, we too have written our own librariy routines.

> 
> And how do people normally use hesiod?

Hesiod is a tool, it is a flexible way for sysadmins to maintain information.
Its "normal use" will grow as your networks complexity grows or as you get 
swamped with maintaining boring system files.

I look at it as a database for variable length text. We use it for system
information that we get tired of distributing on a machine by machine
or netgroup by netgroup (Think NIS) basis.

We use it for;
autoconfigurations on bootup (clusterinfo, hostinfo, other creative things)
autoconfigurations on login (MAILHOST, getpwent, etc)
	note: these can make onetime queries that setenv or create info files.
	      this cuts down on redundent requests.
runtime site/cluster/group/host/user dependent requests.
automounts (We use amd, not automounter) and amd_clusters

We plan to use it with;
more system libraries
AFS maintainance.

> Is it common to replace all yp-maps?
The biggest trick here is the "netgroups" database and those things that use
it. The two most important to us when we implemented them where;

1) restricting NFS mounts by groups of machines
We then modified rpc.mountd to call a hes_resolve() routine instead
of the NIS call. This allowes "netgroups" to work in /etc/exports.
An example;

prompt% cat /etc/exports
/a/egypt/home/elves     -access=ENG_unix
/export/os              -access=DEV_mach
/export/software        -access=DEV_mach
/export/glue1_1         -ro,access=ENG_unix

prompt% hesinfo bacchus.eng.umd.edu ngbyhost
EEserv_mach,EE_mach,ee_cluster,ENG_unix,GLUE_unix


2) restricting logins by groups of users.
Login.c (and others like xdm) were modified to use a /etc/restrict
file which contains  a "NIS like" format for allowing or denying users
by groups.
An example;

prompt% cat /etc/restrict
-@Restrict
+@Elves
+@Special
+@Sys
+@Tools
+@EEdept
-

prompt% hesinfo try ngbyuser
eegrad4,EEgrads,EEdept

We used /usr/etc/yp/revnetgroup {-h,-u} | some_script to create a
netgroup_by_host, netgroup_by_user, and clustername.


> (I really would love to do that, our system has grown to much now :-)

A note here about hesiod_service/name_service. The size of the named
databases get pretty large when you start putting information for
every user's home, mailbox, and pwent. There are usually a lot more users
then machines, so some consideration for RAM on ther hesiod servers is
needed. I am assuming thousands of users here.
> 
> -- 
> Joergen Haegg				jh@efd.lth.se	postmaster@efd.lth.se
> System manager @ efd			046-107492
> Lund Institute of Technology		E-huset, DDG, Ole R|mers v. 3
> 					221 00 LUND, Sweden
> The easiest way to figure the cost of living is to take your income and
> add ten percent.

Try it you will like it.


Randall Winchester
Systems Administrator
College of Engineering
University of Maryland
College Park, Maryland (USA)


home help back first fref pref prev next nref lref last post