Add grml-live script
[grml-live.git] / etc / grml / fai / config / scripts / GRML / 20-sudo
1 #!/bin/sh
2 set -u
3 set -e
4
5 USERNAME=''
6 [ -r /etc/grml/grml-live.conf ] && . /etc/grml/grml-live.conf
7 [ -n "$USERNAME" ] || USERNAME=grml
8
9 cat > "$target"/etc/sudoers << EOF
10 # sudoers file.
11 # This file MUST be edited with the "visudo" command as root.
12 # See the man page for details on how to write a sudoers file.
13
14 # Host alias specification
15
16 # User alias specification
17
18 # Cmnd alias specification
19
20 # User privilege specification
21 root    ALL=(ALL) ALL
22
23 # WARNING: This allows the unprivileged $USERNAME user to start commands as root
24 # WARNING: This is totally insecure and (almost) makes $USERNAME a second root account.
25 # WARNING: Never allow external access to the $USERNAME user!!!
26 $USERNAME    ALL=NOPASSWD: ALL
27
28 # allow editing of files with editor:
29 # $USERNAME ALL=NOPASSWD: sudoedit
30
31 # usage examples:
32 # $USERNAME ALL=NOPASSWD: /sbin/hdparm
33 # $USERNAME ALL=NOPASSWD: /usr/sbin/hwinfo
34 # Cmnd_Alias DEBIAN = /usr/bin/apt-get, /usr/bin/dpkg, /usr/bin/auto-apt, /usr/bin/apt-file
35 # $USERNAME ALL=NOPASSWD: DEBIAN
36 # chroot       ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - chroot
37 # chroot       ALL=NOPASSWD: /usr/sbin/chroot, /bin/su - chroot
38
39 secvpn  ALL=NOPASSWD: /usr/sbin/secvpn, /usr/sbin/pppd
40 EOF