Re: /sys/power/state question with sudoers!



On Sat, Aug 18, 2007 at 03:35:05PM -0500, Gnu_Raiz wrote:
cat sudo_file
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#Defaults env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification

root ALL=(ALL) ALL

xxxx xxxx=NOPASSWD: /bin/echo, /sbin/*, /sys/power/state
^^^^ ^^^^^^^^^^^^^^^^
I assume this is your hostname. |
|
As I understand it, sudo provides access to commands, not files.


Here is the script I am trying to setup.
#!/bin/bash

#This is a shell script for hibernation.

sudo echo disk >/sys/power/state
^^^^
It should work like this, but maybe you should try replacing it with
'/usr/bin/echo'

HTH,
Andrei
--
If you can't explain it simply, you don't understand it well enough.
(Albert Einstein)

Attachment: signature.asc
Description: Digital signature



Relevant Pages

  • Re: Opening applications as a different user
    ... Click Start, Run Command. ... > that only seems to let one run with root privileges? ... > then an instance of Mozilla opens without any issues, ...
    (alt.os.linux.suse)
  • Re: Probleme mit Sudo
    ... # This file MUST be edited with the 'visudo' command as root. ... # See the sudoers man page for the details on how to write a sudoers file. ...
    (de.comp.os.unix.linux.misc)
  • Re: /sys/power/state question with sudoers!
    ... # This file MUST be edited with the 'visudo' command as root. ... As I understand it, sudo provides access to commands, not files. ...
    (Debian-User)
  • Re: sudo Configuration
    ... # This file MUST be edited with the 'visudo' command as root. ... # See the sudoers man page for the details on how to write a sudoers file. ...
    (RedHat)
  • Re: Apple recommending anti-virus software for Macs?
    ... > To be ultra-safe with the 'rm' command, ... Not a bad idea for root, It would drive me nuts in my user account. ... downloads directory and executing it. ... That I type an EOF is a trivial difference versus 'sudo' exiting ...
    (comp.sys.mac.system)