alexis@panix.uucp (Alexis Rosen) (11/26/90)
All of a sudden, for no particular reason, "w" and "lav" are giving me grief. They both respond "no namelist" when I try to use them. If I su to root, w works, but lav doesn't. The man pages are singularly unhelpful, and the only file that w seems to want is /etc/utmp, which is world-readable and writeable. Recreating utmp as an empty file had no beneficial effect. So, what's a namelist, and can I pick one up at the five & dime? --- Alexis Rosen Owner/Sysadmin, PANIX Public Access Unix, NY {cmcl2,apple}!panix!alexis
rmtodd@servalan.uucp (Richard Todd) (11/27/90)
alexis@panix.uucp (Alexis Rosen) writes: >All of a sudden, for no particular reason, "w" and "lav" are giving me grief. >They both respond "no namelist" when I try to use them. If I su to root, w >works, but lav doesn't. Hmm, sounds like a certain file has some permission problems. See below. >The man pages are singularly unhelpful, and the only file that w seems to >want is /etc/utmp, which is world-readable and writeable. Recreating utmp >as an empty file had no beneficial effect. The man page for w is obviously lying, since it desparately needs one other file in order for it to be possible to do what w does--see below. >So, what's a namelist, and can I pick one up at the five & dime? A namelist is a list of names :-). Seriously, it's a list of names and addresses found in an object file. In particular, for any program doing "system-status" stuff like w or lav, the namelist on /unix is very very important, since it allows such programs to find out the addresses in kernel memory of interesting data structures (like avenrun[], the array that holds the load averages!) and thus to read the right bit of kernel memory. So to run programs that grovel thru kernel innards gleaning valuable information, the file /unix needs to be readable. From the symptoms you give, and from what the permissions lav and w run under, I'd say that you've got /unix readable only by root. Make it world-readable and your problems should go away. (The reason you had w working as root but not lav is that lav is setuid bin (hence running under uid bin, not root), but w is only setgid sys. Don't ask me why the permissions are different on the two--there's no obvious reason why they should be....) -- Richard Todd rmtodd@uokmax.ecn.uoknor.edu rmtodd@chinet.chi.il.us rmtodd@servalan.uucp