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.
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
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!
2010/1/18 Peter Alcibiades palcibiades-first@yahoo.co.uk:
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.
Install machine C, which is a server and never turned off. Machine A and B log into that.
Simple, but not the cheapest to setup or run.
Tim.
On Mon, 2010-01-18 at 12:43 +0000, 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?
It may depend to a degree which distribution and graphical environment you are using. For example for GNOME without changing anything:
1. On Debian testing when I last tried, if you picked "Shutdown" from the same GUI menu that had "Logout" and someone else was logged in it silently changed to doing "Logout" instead.
2. On Ubuntu 9.10, when you choose "Shutdown" and you're the only person logged in it does the shutdown. If someone else is logged in it treats it the same as attempting to do 'sudo' and requests the password before it will shut down.
If you're running KDE or a simpler X-based config or using a different distro things may be different. What are you using?
Regards, Steve.
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