LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   shutdown command (https://www.linuxquestions.org/questions/linux-newbie-8/shutdown-command-117559/)

Oakstaff 11-18-2003 05:28 PM

shutdown command
 
How do i set up shutdown so my normal user is able to shutdown the system with out being root?

Gates1026 11-18-2003 05:31 PM

You can set it up through the sudo command

Mikhail_16 11-18-2003 05:39 PM

doesn't 'shutdown -t now' work from user mode? if not then you have to alias 'shutdown' to 'sudo shutdown -t now'.

Tinkster 11-18-2003 05:46 PM

Or make shutdown suid and give execute
permissions to normal users ... bad idea, though ;)


Cheers,
Tink

Oakstaff 11-18-2003 06:28 PM

uhm k, i am still relativly new at Linux so could someone explain alittle better? I know how to chmod and stuff but i saw Tink say its a bad idea so what else could i do, i am the only user and i just didnt want to have to log onto root all the time to shutdown my box....

Tinkster 11-18-2003 08:14 PM

Well ... when I say stuff about security
it's always because a) I have administered
environments with multi-users and b) am
generally a bit paranoid (comes with the
trade ;})

So, you could set the suid flag on shutdown
if no-one else can connect to your machine
from the outside. Read man chmod again to
find out how ;)

Besides that, you shouldn't have to login
as root... KDE for instance has an option
dialog during logout that will allow users
to shut-down the machine, and KDM,
the login manager can do that to. Now,
if you were using Gnome and GDM I
couldn't say for sure that Gnome has
that feature, but the GDM sure does.

Cheers,
Tink

Oakstaff 11-18-2003 08:58 PM

well i do use Gnome but i have it set to goto the Command line at start up so when i exit the gui it just goes back to the command line.

Tinkster 11-18-2003 09:27 PM

oic ... in this case, setuid is the
way to go ... :) ... or make yourself
a sudoer (man sudo).


Cheers,
Tink

Oakstaff 11-18-2003 09:47 PM

thx for the help will try it in abit...=P


All times are GMT -5. The time now is 03:25 AM.