Opened 5 years ago

Closed 5 years ago

#11400 closed enhancement (fixed)

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

Reported by: DJ Lucas Owned by: DJ Lucas
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 (4)

comment:1 by DJ Lucas, 5 years ago

Description: modified (diff)

comment:2 by DJ Lucas, 5 years ago

Description: modified (diff)

comment:3 by DJ Lucas, 5 years ago

Owner: changed from blfs-book to DJ Lucas
Status: newassigned

comment:4 by DJ Lucas, 5 years ago

Resolution: fixed
Status: assignedclosed

Fixed in r20772.

Note: See TracTickets for help on using tickets.