2022-08-24 01:14:55 +02:00
|
|
|
diff --git a/plugins/sudoers/sudoers.in b/plugins/sudoers/sudoers.in
|
2022-09-14 01:23:53 +02:00
|
|
|
index 5efda5d..e757da4 100644
|
2022-08-24 01:14:55 +02:00
|
|
|
--- a/plugins/sudoers/sudoers.in
|
|
|
|
+++ b/plugins/sudoers/sudoers.in
|
2022-09-14 01:23:53 +02:00
|
|
|
@@ -32,32 +32,23 @@
|
2013-07-02 18:30:47 +02:00
|
|
|
##
|
|
|
|
## Defaults specification
|
|
|
|
##
|
|
|
|
-## You may wish to keep some of the following environment variables
|
|
|
|
-## when running commands via sudo.
|
|
|
|
-##
|
|
|
|
-## Locale settings
|
|
|
|
-# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
|
|
|
|
-##
|
|
|
|
-## Run X applications through sudo; HOME is used to find the
|
|
|
|
-## .Xauthority file. Note that other programs use HOME to find
|
|
|
|
-## configuration files and this may lead to privilege escalation!
|
|
|
|
-# Defaults env_keep += "HOME"
|
|
|
|
-##
|
|
|
|
-## X11 resource path settings
|
|
|
|
-# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
|
|
|
|
-##
|
|
|
|
-## Desktop path settings
|
|
|
|
-# Defaults env_keep += "QTDIR KDEDIR"
|
|
|
|
-##
|
|
|
|
-## Allow sudo-run commands to inherit the callers' ConsoleKit session
|
|
|
|
-# Defaults env_keep += "XDG_SESSION_COOKIE"
|
|
|
|
-##
|
|
|
|
-## Uncomment to enable special input methods. Care should be taken as
|
|
|
|
-## this may allow users to subvert the command being run via sudo.
|
|
|
|
-# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
|
2014-10-16 08:00:36 +02:00
|
|
|
-##
|
2022-09-14 01:23:53 +02:00
|
|
|
-## Uncomment to use a hard-coded PATH instead of the user's to find commands
|
|
|
|
-# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
2013-07-02 18:30:47 +02:00
|
|
|
+## Prevent environment variables from influencing programs in an
|
|
|
|
+## unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)
|
|
|
|
+Defaults always_set_home
|
|
|
|
+Defaults env_reset
|
|
|
|
+## Change env_reset to !env_reset in previous line to keep all environment variables
|
2019-08-19 10:38:01 +02:00
|
|
|
+## Following list will no longer be necessary after this change
|
2021-07-28 16:44:04 +02:00
|
|
|
+Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"
|
2013-07-02 18:30:47 +02:00
|
|
|
+## Comment out the preceding line and uncomment the following one if you need
|
2014-10-16 08:00:36 +02:00
|
|
|
+## to use special input methods. This may allow users to compromise the root
|
2013-07-02 18:30:47 +02:00
|
|
|
+## account if they are allowed to run commands without authentication.
|
2021-09-21 16:53:15 +02:00
|
|
|
+#Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
|
2013-07-02 18:30:47 +02:00
|
|
|
+
|
|
|
|
+## Do not insult users when they enter an incorrect password.
|
|
|
|
+Defaults !insults
|
|
|
|
+
|
2022-09-14 01:23:53 +02:00
|
|
|
+## Use this PATH instead of the user's to find commands.
|
|
|
|
+Defaults secure_path="/usr/sbin:/usr/bin:/sbin:/bin"
|
2015-07-24 13:38:45 +02:00
|
|
|
##
|
2022-09-14 01:23:53 +02:00
|
|
|
## Uncomment to send mail if the user does not enter the correct password.
|
|
|
|
# Defaults mail_badpass
|
2022-11-01 23:57:05 +01:00
|
|
|
@@ -68,7 +59,6 @@
|
2022-08-24 01:14:55 +02:00
|
|
|
## Set maxseq to a smaller number if you don't have unlimited disk space.
|
2013-07-02 18:30:47 +02:00
|
|
|
# Defaults log_output
|
|
|
|
# Defaults!/usr/bin/sudoreplay !log_output
|
|
|
|
-# Defaults!/usr/local/bin/sudoreplay !log_output
|
2014-10-16 08:00:36 +02:00
|
|
|
# Defaults!REBOOT !log_output
|
2022-08-24 01:14:55 +02:00
|
|
|
# Defaults maxseq = 1000
|
2013-07-02 18:30:47 +02:00
|
|
|
|
2022-11-01 23:57:05 +01:00
|
|
|
@@ -87,9 +84,6 @@ root ALL=(ALL:ALL) ALL
|
2013-07-02 18:30:47 +02:00
|
|
|
## Same thing without a password
|
2022-02-02 13:27:10 +01:00
|
|
|
# %wheel ALL=(ALL:ALL) NOPASSWD: ALL
|
2013-07-02 18:30:47 +02:00
|
|
|
|
|
|
|
-## Uncomment to allow members of group sudo to execute any command
|
2022-02-02 13:27:10 +01:00
|
|
|
-# %sudo ALL=(ALL:ALL) ALL
|
2013-07-02 18:30:47 +02:00
|
|
|
-
|
2022-11-01 23:57:05 +01:00
|
|
|
## Uncomment to allow any user to run sudo if they know the password
|
|
|
|
## of the user they are running the command as (root by default).
|
|
|
|
# Defaults targetpw # Ask for the password of the target user
|