shutdown broadcast

2007-12-25 7:19:00

ORIGINAL QUESTION:

I manage Sun workstations running mostly SunOS-4.0.3 on Sun3 & Sun4 hosts and

these workstations are located in several different states, NJ, VA, MA, DC

I thought I understood the machanisms that shutdown uses to notify

"appropriate" hosts that it is shutting down. However I'm now getting

complaints from remote users that they don't give a hoot about my machines

in VA shutting down when they are in NJ, and they want the shutdown messages

to stop.

I tried, but they still get the notices. The /etc/rmtab file was emptied, No

one was logged in on the other guy's machine. The only reference in the /etc

directory to the other machine(s) was in the the /etc/netgroup file. Is this

my problem?

Is there any way to tell shutdown to shut-up? (No pun intended.)

Does anybody have an alternative to shutdown other than /etc/halt?

A definitive list of exactly what shutdown uses to determine "appropriate"

hosts to notify would be appreciated.

        Daryl Crandall

        The Mitre Corporation

        daryl@mitre.org

        (703) 883-7278

#############################################################################

MY SUMMARY:

It looks like /etc/rmtab isn't queried during shutdown. The information is

maintained internally by rpc.mountd and the 'mountd' should be forced to

re-read an edited /etc/rmtab before attempting to shutdown.

Shutdown is intentionally noisy.

Shutdown can be simulated in a less noisy manner.

#############################################################################

RESPONDENT SUMMARIES:

#############################################################################

From: "Ric Anderson" <ric@cs.arizona.edu>

Shutdown calls rpc.mountd, to get a list of hosts who have mounted file

systems owned by the local machine. This list is based on rmtab when

the machine is booted (any line not beginning with a "#"), or when

rpc.mountd is restarted. rpc.mountd will fseek /etc/rmtab and plop a

"#" over the first character of the remote host name, if the remote

host issues a umount. Clobbering rmtab before shutdown runs does no

good, because mountd has the authoritative copy in core, and passes

that to shutdown.

However, if the remote host crashes, and doesn't remount the local fs,

then there will then be a bogus entry in /etc/rmtab.

I have a local version of shutdown (called ksys) which fixes the insane

babbling shutdown does, by reducing it to two messages (1 at 10 minutes

and 1 at 1 minute). It also reads rmtab directly, since the rpc call

failed more often than not on certain brain dead sequent operating

systems.

If you want a copy, I'll bundle it up and send it to you. You could

probably hack it to ignore certain hosts in rmtab if need be :-)

#############################################################################

From: Aydin Edguer <edguer@alpha.ces.cwru.edu>

shutdown does a few things.

shutdown creates /etc/nologin.

        touch /etc/nologin

shutdown syncs the system.

        sync;sync

shutdown sends a terminate signal to init.

        kill -TERM 1

shutdown -h halts the system rather than terminating init.

        halt

It uses an RPC to mountd to gather the list of hosts.

############################################################################

From: Rich Wales <wales@CS.UCLA.EDU>

"shutdown" notifies hosts which are using NFS to mount file systems on

the machine being halted. It uses the "rwall" RPC service to send the

warning to each such host.

############################################################################

From: kean@talon.UCS.ORST.EDU

My understanding is that shutdown looks at /etc/rmtab and /etc/xtab to

figure out who has mounted partitions off of this machine, and broadcasts

through the rwall/wall rpc service to those aforementioned machines. Clearing

both those files will stop the messages, but that's a bit drastic. You should

note that the rwall service is a security problem allowing any intelligent

person root access on any machine that runs rwall. I have it commented out

on all mine. The appropriate CERT bulletin can be found on cert.sei.cmu.edu

in the anonymous ftp area I believe.

############################################################################

From: Sam Horrocks <sam@john-bigboote.ICS.UCI.EDU>

"showmount" should show you exacly who will receive the messages. Clearing

rmtab won't help unless aftwerwards you re-start rpc.mountd. Shutdown

contacts rpc.mountd (the same way showmount does) to find out which hosts

have mounted partitiones. I don't think it has anything to do with

/etc/netgroup.

############################################################################

From: sundev!fletch!kevin@Sun.COM (Kevin Sheehan {Consulting Poster Child})

You might check /etc/sm* - if you are passing around NFS mounts, then

this may be used to notify folks as well.

sm* is used by rpc.lockd/rpc.statd to recover on reboots, it might

also be used when going down?

############################################################################

From: steve@umiacs.UMD.EDU (Steve D. Miller)

   It looks like shutdown gets its list of hosts not by looking in rmtab,

but by contacting mountd and doing a MOUNTPROC_DUMP. You might kill

off your mountd, clean out rmtab, and then restart it; that should flush

the bogus host entries.

   I don't see any way to get shutdown not to do any rwalls at all. I

at least think that's a bug, not a feature; I have those annoying messages...

############################################################################

Thanks also to:

From: peterg@murphy.com (Peter Gutmann)

From: David Beard <beard@spam.ua.oz.au>

From: "Anthony A. Datri" <datri@lovecraft.convex.com>

From: metzger@halley.watson.ibm.com (Perry E. Metzger)

Comments

Got something to say?

You must be logged in to post a comment.