LinuxQuestions.org
Help answer threads with 0 replies.
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 11-23-2004, 12:23 PM   #1
jaakkop
Member
 
Registered: Aug 2004
Posts: 433

Rep: Reputation: 30
poweroff and shutdown with own user


how do i give permission to my own user to shutdown my computer in suse 9.1 pro?
 
Old 11-23-2004, 01:34 PM   #2
ror
Member
 
Registered: May 2004
Distribution: Ubuntu
Posts: 583

Rep: Reputation: 33
man sudo
 
Old 12-28-2005, 08:48 AM   #3
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Quote:
Originally Posted by ror
man sudo
Your answer is lame. Man sudo will tell the poster how to use sudo, but elaborating on what this means would certainly have helped.
 
Old 12-28-2005, 09:22 AM   #4
aaparkr
LQ Newbie
 
Registered: Jul 2003
Location: Okc, OK
Distribution: Mandrake 9.0
Posts: 6

Rep: Reputation: 0
Have to agree with Sargek. After fooling with the man sudo file for about 20 minutes (and getting confused) I just ran sudo shutdown -h now . It asked for my user name, it said I wasn't in the sudoers file and the incident would be reported. Then I ran (as a regular user) shutdown -h now (did not use sudo) and the system shutdown fine. This is on mandrake linux release 9.0.



Tony
 
Old 12-28-2005, 10:00 AM   #5
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
In Suse you shoud be able to configure user shutdown in YAST.

Quote:
Security and Users --> ‘Boot Settings’

Specify the ‘Shutdown Behavior of KDM’ by granting permission to shut down the system from the KDE Display Manager, the graphical login of KDE. Give permission to ‘Only root’ (the system administrator), ‘All users’, ‘Nobody’, or ‘Local users’. If ‘Nobody’ is selected, the system can only be shut down via the text console.
otherwise you could look at these options which should be similar in most distros.
http://wiki.archlinux.org/index.php/...rs_to_shutdown
 
Old 12-28-2005, 09:23 PM   #6
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Quote:
Originally Posted by farslayer
In Suse you shoud be able to configure user shutdown in YAST.



otherwise you could look at these options which should be similar in most distros.
http://wiki.archlinux.org/index.php/...rs_to_shutdown
You can configure it through YaST only if you use a login manager - it handles this for you. I do not use a login manager and only boot to the CLI. In a case such as mine, I need to use sudo - there is a nice tutorial on Gentoo's wiki site on how to do this, but I have not implemented or tested it on Suse yet - should be no problem though. I'll post back if I get the Gentoo process to work - I'm running Suse 10.0.
 
Old 12-29-2005, 11:07 PM   #7
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 36
Well, got a process to work, but not the entire Gentoo process as it is on their Wiki because of some issues. Here is what I did: I added thse lines to my /etc/sudoers file by running visudo:

%shutdown ALL=(root) NOPASSWD: /sbin/reboot
%shutdown ALL=(root) NOPASSWD: /sbin/halt

I created a user group called "shutdown", which I added my user to. I created two files in /usr/bin, one called "halt" and the other called "reboot". "halt" contains this:

#! /bin/sh
sudo /sbin/halt

and "reboot" contains this:

#! /bin/sh
sudo /sbin/reboot

I made them both executable, and set ownership to root, with group membership to shutdown. Now, at a command line, all I type (as my normal user), is "halt" or "reboot".
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
SuSE 9.2 shutdown & poweroff Radarman SUSE / openSUSE 1 12-04-2004 02:38 AM
full shutdown, with poweroff scabies Linux - General 5 10-05-2004 10:38 AM
shutdown/poweroff praveenv Linux - Newbie 9 09-03-2004 08:07 AM
SuSE 8.2 Will Not Poweroff, Shutdown, Reboot, Halt... whiskeypriest Linux - Newbie 4 09-18-2003 10:29 AM
SuSE Linux 7 (2.2.16) does'nt poweroff during shutdown linbie Linux - General 2 04-09-2003 06:27 PM

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

All times are GMT -5. The time now is 02:37 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
Open Source Consulting | Domain Registration