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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-23-2004, 12:23 PM
|
#1
|
Member
Registered: Aug 2004
Posts: 433
Rep:
|
poweroff and shutdown with own user
how do i give permission to my own user to shutdown my computer in suse 9.1 pro?
|
|
|
11-23-2004, 01:34 PM
|
#2
|
Member
Registered: May 2004
Distribution: Ubuntu
Posts: 583
Rep:
|
man sudo
|
|
|
12-28-2005, 08:48 AM
|
#3
|
Member
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416
Rep:
|
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.
|
|
|
12-28-2005, 09:22 AM
|
#4
|
LQ Newbie
Registered: Jul 2003
Location: Okc, OK
Distribution: Mandrake 9.0
Posts: 6
Rep:
|
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
|
|
|
12-28-2005, 10:00 AM
|
#5
|
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Rep:
|
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
|
|
|
12-28-2005, 09:23 PM
|
#6
|
Member
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416
Rep:
|
Quote:
Originally Posted by farslayer
|
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.
|
|
|
12-29-2005, 11:07 PM
|
#7
|
Member
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416
Rep:
|
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".
|
|
|
All times are GMT -5. The time now is 02:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|