Opened 5 years ago

Last modified 5 years ago

#11400 closed enhancement

Create sudo configuration files for items installed in /opt (KDE, Java, Xorg, etc.) — at Version 2

Reported by: DJ Lucas Owned by: blfs-book
Priority: normal Milestone: 8.4
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description (last modified by DJ Lucas)

The sudo environment now has an /etc/sudoers.d directory. This should be populated instead of automating edits of /etc/sudoers. Additionally, environment variables that should be preserved for a program to run as the superuser, should be updated using the same mechanism.

Some examples:

## Sudo
cat > /etc/sudoers.d/sudo << "EOF"
Defaults secure_path="/usr/bin:/bin:/usr/sbin:/sbin"
%wheel ALL=(ALL) ALL
EOF

# QT
cat > /etc/suoders.d/qt << "EOF"
Defaults env_keep += QT5DIR
EOF

# IF KDE is installed in /opt
cat >> /etc/sudoers.d/qt << "EOF"
Defaults env_keep += QT_PLUGIN_PATH
Defualts env_keep += QML2_IMPORT_PATH
EOF

# JAVA
cat > /etc/sudoers.d/java << "EOF"
Defaults env_keep += JAVA_HOME
Defaults env_keep += CLASSPATH
EOF

Change History (2)

comment:1 by DJ Lucas, 5 years ago

Description: modified (diff)

comment:2 by DJ Lucas, 5 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.