LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-12-2003, 01:12 PM   #1
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Rep: Reputation: 32
Unhappy shutdown question


Hi there, I am having trouble setting up shutdown privilages.

At this time, only root can shutdown the machine.

I have tried using linuxconf and adding the granted option for the applicable users, but this has not worked.

Another problem, I have is that from the X logon screen, any user can shutdown the machine, how can I change this?

As usual, thanks in advance...
 
Old 02-12-2003, 01:45 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
man sudoers

Cheers,
Tink ...

P.S.: it even comes with examples that
will allow you to do exactly what you wnat ;)
 
Old 02-12-2003, 01:50 PM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
The permissions on /sbin/shutdown enable root and all people in the root group to use this command. What I would do is create a group (e.g. wheel) and add the users who you want to be able to shutdown the machine to this group. Then change the group of the /sbin/shutdown command to the wheel group. Now everybody in the wheel group will be able to shutdown the machine.

As for the X logon screen I don't know. Its a good question that I don't have the answer to.
 
Old 02-12-2003, 01:51 PM   #4
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Original Poster
Rep: Reputation: 32
No Manual Entry For sudoers


???
 
Old 02-12-2003, 01:53 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Crashed, what about $PATH. I'd venture to guess alot of distro's don't include sbin in the users' path. So this person would also have to add /sbin to any user's path who they also wanted to add the "wheel". I do believe sudoers is going to be a slightly more secure/"standard" way of going about this. Not that your idea isn't going to work, just adding /sbin to everyone's path is probably not the best idea since you don't always want every user to both be able to shutdown the system (without some work) and a few other things that are in /sbin for a reason

Cool
 
Old 02-12-2003, 01:53 PM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
Check the LQ man :
http://man.linuxquestions.org/index....ction=0&type=2

Cool
 
Old 02-12-2003, 01:55 PM   #7
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Ahh MasterC coming in to clean up my mess again.
 
Old 02-12-2003, 01:59 PM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
he he he Not clean up your mess, simply assist in answering the question. Your response is a valid one, and could very easily be used. If someone doesn't want to use sudoers for some reason, I'd say your response is going to be fine, and doesn't lack all security because you are adding specific users to a defined group with some purpose.

Cool
 
Old 02-12-2003, 02:03 PM   #9
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
I was not aware that sudoers was more secure then my method although you are right about the $PATH thing. I forgot about that. DOH! What about the graphical logon thing?

Oh boy I know I'm gonna get blasted for this one. I'm just waiting for acid_kewpie to come in here and tell us we are all idiots. MOOVE!!(Nick Burns-Your Companies Computer Guy)
 
Old 02-12-2003, 02:06 PM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
What about it? Not sure what you are asking about the graphical login thing? And I'm assuming you mean KDM or GDM when you say graphical login thing. And it's necessarily "less secure/more secure" AFAIK, but rather sudoers is made to do things exactly like that. It's using a user to take care of some of root's dirty work

Cool
 
Old 02-12-2003, 02:07 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by plisken
No Manual Entry For sudoers


???
Saaaaadness :)
Get a *decent* distro Mate ;)

Nuh, just kidding, even RH can't be that bad :)
check your RPM database for sudo
Code:
rpm -qa | grep sudo
If it's not there install it.

Cheers,
Tink
 
Old 02-12-2003, 02:07 PM   #12
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
From plisken's original post:

Another problem, I have is that from the X logon screen, any user can shutdown the machine, how can I change this?

That logon thing.
 
Old 02-12-2003, 02:11 PM   #13
plisken
Member
 
Registered: Dec 2001
Location: Scotland
Distribution: Slackware 9.1-15 RH 6.2/7, RHEL 6.5 SuSE 8.2/11.1, Debian 10.5
Posts: 516

Original Poster
Rep: Reputation: 32
Aint got sudo installed, so I'll do it when I come in from the pub.


I would like to sort out the X logon screen, preventing simply anyone from either shutting down or rebooting the machine, this is by default, and I for one don't like it...

Time for some beer and football...
 
Old 02-12-2003, 02:14 PM   #14
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
May I suggest you don't get to flagged at the pub. ROOT+DRUNK=BIG PROBLEMS I learned the hard way. Have a McEwan for me would ya.
 
Old 02-12-2003, 02:31 PM   #15
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Torn between Linux and Windows…
Climbing the ladder to heaven (Linux) while a
hell-hound (Windows) is pulling your leg? :)

Cheers,
Tink
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Super Newb Question: How do I Shutdown? djsilent Mandriva 37 12-14-2005 06:24 PM
shutdown command question hongman Linux - Newbie 2 04-13-2005 04:54 PM
Dumb question: how to shutdown from KDE? NickC Mandriva 16 05-28-2004 06:07 PM
Session manager - system shutdown question LooseCanon Red Hat 1 09-23-2003 10:31 PM
boot and shutdown question BajaNick Linux - General 3 08-07-2003 10:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:10 AM.

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
Open Source Consulting | Domain Registration