You are not logged in.
Can someone please help get the following command to run without being root:
echo -n "mem" > /sys/power/state
When I try to run the command as a regualr user in the terminal, I get a permision error. I can run the command in terminal after I type su and enter my password......and the suspend works perfectly....I have no issues with NVIDIA or ipw3945 after rusume.
I was wanting to make a launcher on the XFCE panel or an icon on the desktop that would use this command to suspend my laptop.
Is it possible to run this command without entering the root password? If so, how?
I am running Duke with SLiM and XFCE.
Thanks,
Matt
Offline
use sudo
set in /etc/sudoers to your user NOPASSWD
Give what you have. To someone, it may be better than you dare to think.
Offline
am i the only one who thinks that is a bad idea? if anyone gets their hands on your laptop, they could just do sudo rm -fr / and seriously mess up your system. please correct me if i am wrong.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
am i the only one who thinks that is a bad idea? if anyone gets their hands on your laptop, they could just do sudo rm -fr / and seriously mess up your system. please correct me if i am wrong.
You can set NOPASSWD on the suspend command only, that is what makes sudo so good.
EDIT: and no, you can't run malicious code by renaming rm to suspend, that would require root access and if you got that you don't need sudo...
Last edited by Ramses de Norre (2007-07-13 22:00:01)
Offline
nice, i didnt realize you could limit commands. i will surely be looking into this! thank you sir.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
If someone got their hands on your laptop and wanted to screw you over, don't you figure dropping it from 5' would be enough?
Unthinking respect for authority is the greatest enemy of truth.
-Albert Einstein
Offline
If someone got their hands on your laptop and wanted to screw you over, don't you figure dropping it from 5' would be enough?
I prefer a sledgehammer.
Regardless, once someone gets physical access to a machine, you're generally screwed.
Offline