LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 02-13-2005, 08:42 AM   #1
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Rep: Reputation: 30
(echo -n "standby" > /sys/power/state) only allowed for root?


I have been installing and configuring Debian on a laptop recently and got most stuff working except ALSA.

But I'm wondering about permissions to put the computer into standby, it's done with the command 'echo -n "standby" > /sys/power/state', and you have to have write permission to the /sys/power/state file to be able to do it.

The file is by default set to owner "root" group "root" and "-rw-r--r--/644". So what would be the best way to let users be able to do this command? Should I add them to the root group and put write permission to "Groups"? Should I put write permission for "Others"? Should I create a new group called "X" and change the group of this file to "X" and give writing permission to "Groups"?

I don't really know what would be the ideal way, that's why I'm asking.

Last edited by brynjarh; 02-13-2005 at 08:43 AM.
 
Old 02-13-2005, 02:04 PM   #2
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
Is it that you want all users to be able to do it? Or just some?

Either way i like the sudo idea.

It allows the user to have root privileges for specific commands if you so wish.

In RH distros the list can be accessed and editted by running visudo or otherwise editting the /etc/sudoers file.

lemme know if that helped.
 
Old 02-13-2005, 02:20 PM   #3
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Original Poster
Rep: Reputation: 30
I want all users to be able to, it's a laptop and users should be able to put it into standby without having administration privileges I believe.

I could use sudo but I rather not since I don't think a laptop user should need a password to be able to put the computer into standby or any other power saving mode..
 
Old 02-13-2005, 02:30 PM   #4
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
hmmm....ok

I think ACPI or something like that will handle laptop battery monitoring as well as allowing for suspend and standby settings as well as the auto-timing of those events.

hope this helps...
 
Old 02-14-2005, 06:09 AM   #5
brynjarh
Member
 
Registered: May 2004
Location: Iceland
Distribution: Ubuntu Dapper Drake
Posts: 172

Original Poster
Rep: Reputation: 30
Yea I have already installed ACPI, and the command I'm talking about in the beginning of this thread is the way ACPI put's the computer into standby, but normal users don't have write access to the file so they can't do 'echo -n "standby" > /sys/power/state' , I'm wondering what the ideal way is to allow normal users to do that.

Back to square one..
 
Old 02-14-2005, 09:08 AM   #6
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
I figure a chmod 646 to the state file may work.

I hope this file isn't rewritten with precise permisions often or on every reboot.

Give it a try...lemme know how it works out

I think i had this working on an old laptop once....but i never checked...ACPI just worked for me...

Last edited by DoubleOTeC; 02-14-2005 at 09:09 AM.
 
  


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
newbie question: whats the difference between "su root", "su" and "su -&quo mojarron Slackware 9 12-07-2009 04:08 PM
What "kernel opts" allow PC to power down with "turning energy off"? kornerr Linux - General 1 03-10-2005 12:07 PM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-06-2005 11:44 PM
cannot "echo ... > /sys/.../cpufreq/scaling_setspeed" rgiggs Slackware 5 01-02-2005 10:12 PM
Power Management(sysfs) /sys/power/state mavrick613 Linux - General 0 05-24-2004 03:04 PM


All times are GMT -5. The time now is 07:22 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration