You are not logged in.
How would I prevent user Tux from having restart & shutdown as options from the power button on the top panel? i guess i'd need close session to be enabled to login as root and perform such tasks.
Instead of, or as well as, would it be possible to add a password or numeric code that needs to be entered to actually access these three options when clicking on the power icon? In effect "preventing" user Tux from leaving their session.
Thank you.
Offline
Why would this be a good idea? The user 'tux' is effectively the administrator on the system currently it seems, but disabling any support for policykit and/or consolekit in the login system could ensure that the user could not power off the machine by themselves.
Offline
Because in this case the system is being used by a group of children, having them boot up and switch off at will is not the best way for them to be interacting with the system. Having them not power off the system by themselves is exactly what i'm after, hence the original request.
Offline
Tux is just a user account and it has no root authority by default. That's what su is for.
You can edit the panel by editing the files found in ~/.config/lxpanel which should give you the ability to remove the logout button. There is also a option in pcmanfm's settings that can disable openbox's menu (it's under desktop setting - just uncheck the box). That should effectively disable the ability to turn off the system except by running the shutdown command in a terminal.
Offline
Thanks Trixar, Looking at the panels pointed me in the right direction.
The power button icon simply executes the module "slitaz-logout"
I found that the slitaz-logout.desktop module is located in /usr/share/applications
If you edit slitaz.logout you'll find that it calls the command "tazbox logout". I edited this to instead run "tazbox su /usr/share/applications/logout.sh"
I then created the file logout.sh and made it executable. In the file exists the original command from slitaz-logout.desktop "tazbox logout"
Now, user Tux or any other non SU user has to enter the root password to logout, restart and shutdown.
This has turned out to be exactly what I was looking for and leaves the logout button functioning as it was meant to as well, albeit password protected.
Offline
[ Generated in 0.016 seconds, 7 queries executed - Memory usage: 1.53 MiB (Peak: 1.77 MiB) ]