add sudoers file, ensuring no users are sudoers with no or default passwd

pull/10/head
Raphaël Vinot 2013-11-20 15:40:29 +01:00
parent c01482a8b1
commit 5cfaba7638
2 changed files with 34 additions and 3 deletions

View File

@ -2,8 +2,9 @@
useradd -m kitten
echo "Cmnd_Alias GROOMER_CMDS = /home/kitten/kitten_mount_src, \
/home/kitten/kitten_mount_dst, /home/kitten/kitten_umount" >> /etc/sudoers
echo "kitten ALL=(ALL) NOPASSWD: GROOMER_CMDS" >> /etc/sudoers
# Useless: the sudoer file comes from the repository
#echo "Cmnd_Alias GROOMER_CMDS = /home/kitten/kitten_mount_src, \
# /home/kitten/kitten_mount_dst, /home/kitten/kitten_umount" >> /etc/sudoers
#echo "kitten ALL=(ALL) NOPASSWD: GROOMER_CMDS" >> /etc/sudoers
# /!\ REMOVE SUDO RIGHTS TO USER pi

30
fs/etc/sudoers Normal file
View File

@ -0,0 +1,30 @@
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
#root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
#%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d
#pi ALL=(ALL) NOPASSWD: ALL
Cmnd_Alias GROOMER_CMDS = /home/kitten/kitten_mount_src, /home/kitten/kitten_mount_dst, /home/kitten/kitten_umount
kitten ALL = NOPASSWD: GROOMER_CMDS