I have used gksu -w shutdown -hP now
as a system-wide menu command in icewm
, so that when a non-admin user clicked the shutdown from the menu, a password dialogue box will appear asking for the admin password. That was when I was running icewm in Linux Mint.
When I switched to Ubuntu, the same command wouldn't work. Although the same dialogue box asking for admin password appears, but none of the existing sudoers password I tried would work or accepted. Even the password of the first account I was asked to make on installation of Ubuntu wouldn't work.
I have also tried gksu -u admin-user -w 'shutdown -hP now
, but the error message "shutdown: Need to be root" came up.
So what is the difference between Ubuntu's and Mint's gksu rules? I'm currently using Ubuntu 12.04 LTS, and the Mint I'm referring to is Mint 13 Maya. And what could be other alternative ways to allow a Shutdown command in the IceWM menu for non-admin users, but I still want them to ask permission first from me before they could shutdown, by asking for my admin password?
Besides shutdown, I also have other commands in the IceWM menu that require admin privileges, like hibernate
, to mount a backup partition, and synaptic
, which I applied gksu -w
with.