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.