Унификация /etc/sudoers

raspopov

New member
Сообщения
5
#1
Как известно Astra Linux поддерживает расширенный вариант sudoers, а именно, кроме собственно файла /etc/sudoers, правила загружаются так же из каталога /etc/sudoers.d/. Однако Astra Linux не строго следует рекомендациям и добавляет новые правила непосредственно в сам файл.
Возникает предложение соблюсти соглашение и перенести эти правила в соответствующие файлы в каталог /etc/sudoers.d/.

Пример файла /etc/sudoers (из Astra Linux SE 1.7.2):
Bash:
#
# 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
%astra-admin	ALL=(ALL:ALL) NOPASSWD: ALL
Дополнительное правило, которое должно быть перенесено - в последней строке:
Bash:
%astra-admin	ALL=(ALL:ALL) NOPASSWD: ALL