To: Hubert Feyrer <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 12/03/1997 05:00:20
>maybe I'll get the chance to setup some of our lab machines for dual-boot wirh
>WinNT... how my questions is, how do I enable users to shotdown the machine,
>without knowing the root password? Shutting down via Ctl-Alt-Del would be
>best... does PC- or VT-console provite any hooks there?
The Linux console code (which I think shares an ancestor with pcvt)
does this; I don't know about NetBSD.
In the past I've used a rather different approach: run XDM to manage
the local display and tell users to log in as the user `NT'.
Create an account `NT' with no password and with a disabled shell
(like /bin/false). Add code in the XDM session-initialization script
(which runs as root, so it can give away /dev/console) to check for
the user `NT'. If the user `NT' logs into via xdm on the local
display, do a shutdown (and exit so the user does't get a root shell).
I first used it to kill X so users could log in under different
windowing systems, but it works for reboots too.
Maybe that works in your environment.