If I'm using Ubuntu 11.04, how can I configure it such that that only two users can shut down/suspend/hibernate my PC: the root user and one regular user?
|
The
If you want them to be able to shut down without being prompted for their password, then add the NOPASSWD option, like this:
You can modify the way they can run shutdown by using wildcards or explicit declarations. For example After you configure sudoers, joe can run the following command to reboot the system:
As joe, you can run the following command to see what commands you have access to run using
|
|||
|
|
|
To disable shutdown from the login menu, edit the Note that there is no way to stop them from just unplugging it or pressing the power button on the front of the PC, so the trend in linux distributions for home use has been to allow these functions to all users sitting physically at the computer with no obvious way to disable it. |
|||
|
|
|
For the power button, you might want to look into /etc/acpi/events/power_button . While you are at it, you might also want to look in /etc/inittab for ctrlaltdel . |
|||
|
|