Hacking Linux Exposed

About
Authors
Contents
Reviews
Foreword
Purchase

Articles
Books
Sourcecode
Tools
Errata

Home

 


(view this code in a separate window)

# This is an example sudoers file that
# shows how you can restricte command-line
# arguments for given users based on the
# group you put them in.

User_Alias      HTTPD_FULL=ryan,chris,maddie,reegen
User_Alias      HTTPD_RESTRICTED=taxee,harper

Cmnd_Alias      APACHECTL=/etc/apachectl *
Cmnd_Alias      WEB_RESTART=/etc/apachectl start,
                            /etc/apachectl stop

HTTPD_FULL            ALL=(ALL) APACHECTL
HTTPD_RESTRICTED      ALL=(ALL) WEB_RESTART