LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 02-03-2010, 04:41 PM   #1
neilthereildeil
LQ Newbie
 
Registered: May 2006
Posts: 19

Rep: Reputation: 0
pm-suspend as nonroot


Hi. I have a nonroot user and i want to be able to suspend the system as that user. i dont want to have to type the root password or sudo everytime i suspend, because i do this multiple times in a day.when i try to suspend, i get the following error:

/usr/sbin/pm-suspend
This utility may only be run by the root user.

does anyone know how to allow a nonroot user to run this without having to sudo etc? thanks.
 
Old 02-03-2010, 11:13 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Depending on your distro, you should be able to suspend from the shutdown menu.

You can set up a sudoer (/etc/sudoers) who can run the command, and only that command, as root. Then set up a launcher so you don't have to type the command in every time either.
 
Old 02-03-2010, 11:30 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Does your system use policy-kit. Try "polkit-auth --user <username> --show-obtainable". Does it have an entry dealing with suspending?

It used to be the case that programs like this were made suid root to enable regular users to run them. However this usually leaves a dangerous hole. Linux has moved from setting the suid bit --> to udev changing group ownership or permissions on devices --> to policy kit --> to where most of my old polkit rules have gone (session kit / dbus)?

Now you need to use your desktop environment configuration tools to make certain you do something like this properly. A client/server approach is now most common. The desktop communicates the request through dbus. The system determines whether you are authorized to do it and carries it out for you.

Look in the "users & groups" or "security section" configuration section for your distro. That is usually where these type of permissions are made. It could also be a matter of the feature not being enabled. Look at your desktop power management control as well.

If you didn't create a swap partition as large as your memory, you won't be able to suspend your machine. The swap partition is the resume device. It needs to be as large as your memory to be able to dump the memory info there.
 
Old 02-04-2010, 11:37 PM   #4
neilthereildeil
LQ Newbie
 
Registered: May 2006
Posts: 19

Original Poster
Rep: Reputation: 0
by the way, im running gentoo linux.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
acl rest by nonroot and owner vishesh Linux - Security 2 09-23-2008 07:36 AM
sendmail - nonroot users can't send mail Sagebrush Gardener Linux - Server 2 03-08-2007 01:59 PM
how to give a nonroot user write access Kilahchris Linux - Newbie 8 05-11-2005 02:10 AM
Dropline GNOME nonroot audio cry0x Slackware 6 02-27-2005 03:34 AM
Access NTFS mount @ nonroot? af09 Linux - Newbie 6 01-14-2004 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 02: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