Merge branch 'master' of git.onelab.eu:/git/nodeconfig
[nodeconfig.git] / PlanetLabConf / sudoers.php
1 <?php
2 // Get admin API handle
3 require_once 'plc_config.php';
4
5 $user = PLC_SLICE_PREFIX . '_monitor';
6
7 echo "# -----------------------------------------------------------------
8 # We're assuming that ssh authentication has already been used, this
9 # is more risky than I'm comfortable with, but it saves the problem 
10 # of managing a separate password file.
11 # -----------------------------------------------------------------
12 Defaults        !authenticate
13
14 # -----------------------------------------------------------------
15 # No surpise... root has universal access
16 # -----------------------------------------------------------------
17 root            ALL = (ALL) ALL
18
19 # -----------------------------------------------------------------
20 # SITE_CMDS are those available to local site administrators
21 # -----------------------------------------------------------------
22 Cmnd_Alias      SITE_CMDS =     /usr/sbin/vps, \
23                                 /usr/sbin/vpstree, \
24                                 /usr/sbin/vtop, \
25                                 /bin/ps, \
26                                 /usr/bin/pstree, \
27                                 /usr/bin/top, \
28                                 /usr/sbin/tcpdump, \
29                                 /usr/bin/pfgrep, \
30                                 /usr/local/planetlab/bin/pl-catlogs, \
31                                 /sbin/halt, \
32                                 /sbin/reboot, \
33                                 /sbin/shutdown, \
34                                 /usr/bin/passwd -d site_admin, \
35                                 /usr/bin/passwd site_admin, \
36                                 /bin/more /var/log/messages, \
37                                 /bin/more /var/log/nm
38
39 # -----------------------------------------------------------------
40 # Site Admins -- accounts with admin privileges on the local nodes
41 # -----------------------------------------------------------------
42 site_admin      ALL = SITE_CMDS
43 $user       ALL = SITE_CMDS
44 ";
45 ?>