LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-18-2003, 06:28 PM   #1
Oakstaff
Member
 
Registered: Nov 2003
Location: Tulsa, Ok
Posts: 121

Rep: Reputation: 15
shutdown command


How do i set up shutdown so my normal user is able to shutdown the system with out being root?
 
Old 11-18-2003, 06:31 PM   #2
Gates1026
Member
 
Registered: Sep 2003
Location: Iowa
Distribution: Slackware 9.1
Posts: 155

Rep: Reputation: 30
You can set it up through the sudo command
 
Old 11-18-2003, 06:39 PM   #3
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
doesn't 'shutdown -t now' work from user mode? if not then you have to alias 'shutdown' to 'sudo shutdown -t now'.
 
Old 11-18-2003, 06:46 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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


Cheers,
Tink
 
Old 11-18-2003, 07:28 PM   #5
Oakstaff
Member
 
Registered: Nov 2003
Location: Tulsa, Ok
Posts: 121

Original Poster
Rep: Reputation: 15
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....
 
Old 11-18-2003, 09:14 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
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
 
Old 11-18-2003, 09:58 PM   #7
Oakstaff
Member
 
Registered: Nov 2003
Location: Tulsa, Ok
Posts: 121

Original Poster
Rep: Reputation: 15
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.
 
Old 11-18-2003, 10:27 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

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


Cheers,
Tink
 
Old 11-18-2003, 10:47 PM   #9
Oakstaff
Member
 
Registered: Nov 2003
Location: Tulsa, Ok
Posts: 121

Original Poster
Rep: Reputation: 15
thx for the help will try it in abit...=P
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shutdown command? MikeZila Linux - Newbie 7 07-27-2008 06:09 PM
shutdown command xviddivxoggmp3 Red Hat 5 05-12-2004 05:48 PM
shutdown command mikedelo Linux - Software 7 03-15-2004 09:37 AM
shutdown command nelly_boy Linux - Software 11 08-03-2003 07:04 AM
Shutdown Command? AMDPwred Linux - General 1 01-25-2002 09:43 PM


All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration