How To Install sudo on Rocky Linux 8
Introduction
In this tutorial we learn how to install sudo
on Rocky Linux 8.
What is sudo
Sudo (superuser do) allows a system administrator to give certain users (or groups of users) the ability to run some (or all) commands as root while logging all commands and arguments. Sudo operates on a per-command basis. It is not a replacement for the shell. Features include per-host basis, copious logging of each command (providing a clear audit trail of who did what), a configurable timeout of the sudo command, and the ability to use the same configuration file (sudoers) on many different machines.
We can use yum
or dnf
to install sudo
on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install sudo.
Install sudo on Rocky Linux 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
After updating yum database, We can install sudo
using dnf
by running the following command:
sudo dnf -y install sudo
Install sudo on Rocky Linux 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
After updating yum database, We can install sudo
using yum
by running the following command:
sudo yum -y install sudo
How To Uninstall sudo on Rocky Linux 8
To uninstall only the sudo
package we can use the following command:
sudo dnf remove sudo
sudo Package Contents on Rocky Linux 8
/etc/dnf/protected.d/sudo.conf
/etc/pam.d/sudo
/etc/pam.d/sudo-i
/etc/sudo-ldap.conf
/etc/sudo.conf
/etc/sudoers
/etc/sudoers.d
/usr/bin/cvtsudoers
/usr/bin/sudo
/usr/bin/sudoedit
/usr/bin/sudoreplay
/usr/lib/.build-id
/usr/lib/.build-id/09
/usr/lib/.build-id/09/e6a75d85fe6a101935db7023ed73cee3830f75
/usr/lib/.build-id/54
/usr/lib/.build-id/54/4048eccd30635cf6b109700428cbe9fd9701be
/usr/lib/.build-id/63
/usr/lib/.build-id/63/13f4c8f5dce631b29d083cc5699b65177c3bbc
/usr/lib/.build-id/64
/usr/lib/.build-id/64/5cf4db5e0b7f4449360bbfcfcc803dbf4b0ed0
/usr/lib/.build-id/69
/usr/lib/.build-id/69/cf70be6dca5a899e5dbc0ffdd315e4a7b26c39
/usr/lib/.build-id/72
/usr/lib/.build-id/72/a13fb831864fd61521aefaa68c03b99313d828
/usr/lib/.build-id/7e
/usr/lib/.build-id/7e/9a67a196c2860b0e66683e9e60b486a74bc324
/usr/lib/.build-id/91
/usr/lib/.build-id/91/a48734b82d02e0cff839f175a3c505c571f074
/usr/lib/.build-id/96
/usr/lib/.build-id/96/4ca90aa132a1adbeb15dea5af78369e95a50c7
/usr/lib/.build-id/bc
/usr/lib/.build-id/bc/defd1c5969f3f17575e8db29275467db066c30
/usr/lib/tmpfiles.d/sudo.conf
/usr/libexec/sudo
/usr/libexec/sudo/group_file.so
/usr/libexec/sudo/libsudo_util.so
/usr/libexec/sudo/libsudo_util.so.0
/usr/libexec/sudo/libsudo_util.so.0.0.0
/usr/libexec/sudo/sesh
/usr/libexec/sudo/sudo_noexec.so
/usr/libexec/sudo/sudoers.so
/usr/libexec/sudo/system_group.so
/usr/sbin/visudo
/usr/share/doc/sudo
/usr/share/doc/sudo/CONTRIBUTORS
/usr/share/doc/sudo/HISTORY
/usr/share/doc/sudo/NEWS
/usr/share/doc/sudo/README
/usr/share/doc/sudo/README.LDAP
/usr/share/doc/sudo/TROUBLESHOOTING
/usr/share/doc/sudo/UPGRADE
/usr/share/doc/sudo/examples
/usr/share/doc/sudo/examples/pam.conf
/usr/share/doc/sudo/examples/sudo.conf
/usr/share/doc/sudo/examples/sudoers
/usr/share/doc/sudo/examples/syslog.conf
/usr/share/doc/sudo/schema.ActiveDirectory
/usr/share/doc/sudo/schema.OpenLDAP
/usr/share/doc/sudo/schema.iPlanet
/usr/share/doc/sudo/schema.olcSudo
/usr/share/licenses/sudo
/usr/share/licenses/sudo/LICENSE
/usr/share/locale/ast/LC_MESSAGES/sudo.mo
/usr/share/locale/ast/LC_MESSAGES/sudoers.mo
/usr/share/locale/ca/LC_MESSAGES/sudo.mo
/usr/share/locale/ca/LC_MESSAGES/sudoers.mo
/usr/share/locale/cs/LC_MESSAGES/sudo.mo
/usr/share/locale/cs/LC_MESSAGES/sudoers.mo
/usr/share/locale/da/LC_MESSAGES/sudo.mo
/usr/share/locale/da/LC_MESSAGES/sudoers.mo
/usr/share/locale/de/LC_MESSAGES/sudo.mo
/usr/share/locale/de/LC_MESSAGES/sudoers.mo
/usr/share/locale/el/LC_MESSAGES/sudoers.mo
/usr/share/locale/eo/LC_MESSAGES/sudo.mo
/usr/share/locale/eo/LC_MESSAGES/sudoers.mo
/usr/share/locale/es/LC_MESSAGES/sudo.mo
/usr/share/locale/eu/LC_MESSAGES/sudo.mo
/usr/share/locale/eu/LC_MESSAGES/sudoers.mo
/usr/share/locale/fi/LC_MESSAGES/sudo.mo
/usr/share/locale/fi/LC_MESSAGES/sudoers.mo
/usr/share/locale/fr/LC_MESSAGES/sudo.mo
/usr/share/locale/fr/LC_MESSAGES/sudoers.mo
/usr/share/locale/fur/LC_MESSAGES/sudo.mo
/usr/share/locale/fur/LC_MESSAGES/sudoers.mo
/usr/share/locale/gl/LC_MESSAGES/sudo.mo
/usr/share/locale/hr/LC_MESSAGES/sudo.mo
/usr/share/locale/hr/LC_MESSAGES/sudoers.mo
/usr/share/locale/hu/LC_MESSAGES/sudo.mo
/usr/share/locale/hu/LC_MESSAGES/sudoers.mo
/usr/share/locale/it/LC_MESSAGES/sudo.mo
/usr/share/locale/it/LC_MESSAGES/sudoers.mo
/usr/share/locale/ja/LC_MESSAGES/sudo.mo
/usr/share/locale/ja/LC_MESSAGES/sudoers.mo
/usr/share/locale/ko/LC_MESSAGES/sudo.mo
/usr/share/locale/ko/LC_MESSAGES/sudoers.mo
/usr/share/locale/lt/LC_MESSAGES/sudoers.mo
/usr/share/locale/nb/LC_MESSAGES/sudo.mo
/usr/share/locale/nb/LC_MESSAGES/sudoers.mo
/usr/share/locale/nl/LC_MESSAGES/sudo.mo
/usr/share/locale/nl/LC_MESSAGES/sudoers.mo
/usr/share/locale/nn/LC_MESSAGES/sudo.mo
/usr/share/locale/pl/LC_MESSAGES/sudo.mo
/usr/share/locale/pl/LC_MESSAGES/sudoers.mo
/usr/share/locale/pt/LC_MESSAGES/sudo.mo
/usr/share/locale/pt/LC_MESSAGES/sudoers.mo
/usr/share/locale/pt_BR/LC_MESSAGES/sudo.mo
/usr/share/locale/pt_BR/LC_MESSAGES/sudoers.mo
/usr/share/locale/ru/LC_MESSAGES/sudo.mo
/usr/share/locale/ru/LC_MESSAGES/sudoers.mo
/usr/share/locale/sk/LC_MESSAGES/sudo.mo
/usr/share/locale/sk/LC_MESSAGES/sudoers.mo
/usr/share/locale/sl/LC_MESSAGES/sudo.mo
/usr/share/locale/sl/LC_MESSAGES/sudoers.mo
/usr/share/locale/sr/LC_MESSAGES/sudo.mo
/usr/share/locale/sr/LC_MESSAGES/sudoers.mo
/usr/share/locale/sv/LC_MESSAGES/sudo.mo
/usr/share/locale/sv/LC_MESSAGES/sudoers.mo
/usr/share/locale/tr/LC_MESSAGES/sudo.mo
/usr/share/locale/tr/LC_MESSAGES/sudoers.mo
/usr/share/locale/uk/LC_MESSAGES/sudo.mo
/usr/share/locale/uk/LC_MESSAGES/sudoers.mo
/usr/share/locale/vi/LC_MESSAGES/sudo.mo
/usr/share/locale/vi/LC_MESSAGES/sudoers.mo
/usr/share/locale/zh_CN/LC_MESSAGES/sudo.mo
/usr/share/locale/zh_CN/LC_MESSAGES/sudoers.mo
/usr/share/locale/zh_TW/LC_MESSAGES/sudo.mo
/usr/share/locale/zh_TW/LC_MESSAGES/sudoers.mo
/usr/share/man/man1/cvtsudoers.1.gz
/usr/share/man/man5/sudo-ldap.conf.5.gz
/usr/share/man/man5/sudo.conf.5.gz
/usr/share/man/man5/sudoers.5.gz
/usr/share/man/man5/sudoers.ldap.5.gz
/usr/share/man/man5/sudoers_timestamp.5.gz
/usr/share/man/man8/sudo.8.gz
/usr/share/man/man8/sudoedit.8.gz
/usr/share/man/man8/sudoreplay.8.gz
/usr/share/man/man8/visudo.8.gz
/var/db/sudo
/var/db/sudo/lectured
References
Summary
In this tutorial we learn how to install sudo
on Rocky Linux 8 using yum and dnf.