LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-30-2014, 08:57 PM   #1
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
power saving. Laptop-mode not working


I keep my laptop plugged in because I don't trust laptop mode. It has worked in the past but I haven't tested it in a while. This morning my laptop got unplugged and it crashed b/c it wasn't in a sleep/hibernate state.

These used to work. Now they don't
PHP Code:
dan@mojo ~ $ sudo echo mem > /sys/power/state 
bash
: /sys/power/statePermission denied
dan
@mojo ~ $ sudo echo mem >> /sys/power/state 
bash
: /sys/power/statePermission denied 
If I actually su to root first, then it works.
I'm not sure what changed but the change in manual functionality seems to be coupled with the issues with laptop-mode.
Any suggestions?
 
Old 10-30-2014, 10:22 PM   #2
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Sounds like you need to edit /etc/sudoers to ensure that you have the permission to execute those commands with sudo.
 
Old 11-02-2014, 01:10 PM   #3
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Original Poster
Rep: Reputation: Disabled
I've posted my /etc/sudoers file,
Based on this configuration I would think that anyone with the wheel flag should have sufficient access


https://bpaste.net/show/13ed7b723697

Code:
dan@mojo ~ $ groups dan
wheel audio video portage games dropbox dan
 
Old 11-02-2014, 02:12 PM   #4
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
Read the comments in the file you posted. The section AFTER where you uncommented discusses allowing users to execute a command without a password. The section you opened up will allow users to execute the commands, but they will need to enter a password.
 
Old 11-02-2014, 03:17 PM   #5
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Original Poster
Rep: Reputation: Disabled
Right. I saw that, and admittedly never tried that but it seems insecure. I am used to entering my password after running Sudo.
Also, I don't see how that would make a difference since ultimately the permissions are the same.
 
Old 11-02-2014, 03:32 PM   #6
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
If you grant explicit permission to one command, for one user, without the use of a password, this can be helpful for things like cron jobs. You need to understand what the user could potentially do with that one command and decide if it's an appropriate level of security for your system. Granting wide open access to to groups of users to do whatever they want without a password as a major security hole.
 
Old 11-02-2014, 05:16 PM   #7
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Original Poster
Rep: Reputation: Disabled
Ok. Thanks. I'll see if I can find a Sudo tutorial and figure out how to do that for the echo command.
 
Old 11-02-2014, 08:33 PM   #8
ember1205
Member
 
Registered: Oct 2014
Posts: 176

Rep: Reputation: 16
man sudoers
 
  


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
Problem with power saving mode sibnath Fedora 1 04-17-2006 08:13 AM
FC4 Machine going to weird power saving mode lsgko Fedora 1 04-05-2006 07:21 AM
My display goes to power saving mode even during games. A.K Mandriva 1 03-22-2005 10:40 AM
power saving mode at login screen hari78 Linux - Newbie 1 03-07-2005 11:43 AM
Power Saving mode in Redhat 9 montgom Red Hat 0 04-12-2004 07:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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