Hi Pete
On Mon, Jan 18, 2010 at 12:43 PM, Peter Alcibiades palcibiades-first@yahoo.co.uk 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.
In KDE login menu, you can alter the commands that are called via the halt and reboot commands can create a bash script that checked for different uesrs that are already online and if so output a message if not.. carry on with the halt/reboot ? you could also write a shutdown script that is called instead of the main one as well ?
Just a idea Ian
Mysite: http://www.codingfriends.com
I'm proposing to just use XDCMP by the way, for the remote working, since we are behind a firewall router. This is safe enough in that case, isn't it?
Peter
main@lists.alug.org.uk http://www.alug.org.uk/ http://lists.alug.org.uk/mailman/listinfo/main Unsubscribe? See message headers or the web site above!