Subject: Generate Sun NIS netgroups for your sites' DNS domains From: ken.manheimer@NIST.GOV (Ken Manheimer) To: python-list@cwi.nl Date: Wed, 05 Apr 1995 12:08:39 -0400 (EDT) Organization: National Institute of Standards and Technology I use the following python script to generate Sun NIS (formerly YP) netgroups for all the DNS domains in my organizations network. This enables me to export NFS filesystems to, eg, all and only the hosts in my organization, or just the hosts in one divisions' network. It is real handy. See the docstring and comments at the top for instructions, if you're interested. Note that the script uses only the standard python libraries - no subproc.py or anything. (It does depend on the public-domain Unix 'host' command, though.) I wanted it to operate under similar constraints as the TCL script which i originally wrote to do this job, so i could compare the code and operation of the respective scripts. (I wrote the TCL script about two years ago, when i was evaluating TCL as a scripting prospect. It was a first effort, and probably more sloppy than needs be. The difficulty in implementing it is what led me to look for other scripting-language prospects, and finally to python. However, the script has been used in production since then, in support of my NFS file service. I've been having some problems with it, and it has gotten almost unbearable to maintain it, so i finally gave in and reimplemented in python. And, of course, the python version was extremely much easier and more simple to implement, and more efficient to boot. I'd be willing to post the TCL version, if anyone is interested in contrasting - though i don't think i did a fair job on the tcl version. Perhaps someone could work on the TCL version, and we could have a decent version in each language, to compare and contrast...) Note that both versions of the script depend upon the public-domain dns lookup utility, 'host', for their operation. I believe it's available from the major unix-sources distribution sites. ken ken.manheimer@nist.gov, 301 975-3539 .