On 18 Jan 2010, at 12:43, Peter Alcibiades wrote:
How do you stop users from shutting down the system if there are other people connected, but allow them to shut it down if there are not?
Here's the background, I have machines A and B in different locations. Machine A is sometimes going to be used by just anyone, on account X, and sometimes by the main secretary on account Y. Sometimes, to allow the others to work on Machine A, the secretary will decamp to another room, and continue to work on account Y on machine A, but will be phyically located at machine B.
Now it occurs to one, life being what it is, that from time to time some other user sitting at machine A, not used to the concept of multiple logins, will just try and turn off the machine while the secretary is working and logged in on it on the different account.
How do I stop this? Hopefully by sending a message to the effect, you cannnot shut down this machine because there are other people connected?
On the other hand, I don't want to stop all user shutdowns, because often there is not going to be any remote connection.
Assuming a debian-like system, what about molly-guard?
http://www.ubuntugeek.com/molly-guard-protects-machines-from-accidental-shut... http://packages.debian.org/unstable/admin/molly-guard
Cheers,
David