[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



 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

note xxxx is used to protect the user.
-----------------------------------------------------------------------------------------------------

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

#This is a shell script for hibernation.

sudo echo disk >/sys/power/state


Gnu_Raiz



Reply to: