Browse Source

sudo: Add sudoers file for new format used in Bullseye

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
Maximilian Wilhelm 2 years ago
parent
commit
9d7080a78d
2 changed files with 30 additions and 1 deletions
  1. 3 1
      sudo/init.sls
  2. 27 0
      sudo/sudoers.Debian.bullseye

+ 3 - 1
sudo/init.sls

@@ -15,4 +15,6 @@ sudo:
 
 /etc/sudoers:
   file.managed:
-    - source: salt://sudo/sudoers
+    - source:
+      - salt://sudo/sudores.{{ grains.os }}.{{ grains.oscodename }}
+      - salt://sudo/sudoers

+ 27 - 0
sudo/sudoers.Debian.bullseye

@@ -0,0 +1,27 @@
+#
+# 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