How To Install sudo on Fedora 36

In this tutorial we learn how to install sudo in Fedora 36. sudo is Allows restricted root access for specified users

Introduction

In this tutorial we learn how to install sudo on Fedora 36.

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 Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install sudo.

Install sudo on Fedora 36 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 Fedora 36 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 Fedora 36

To uninstall only the sudo package we can use the following command:

sudo dnf remove sudo

sudo Package Contents on Fedora 36

/etc/dnf/protected.d/sudo.conf
/etc/pam.d/sudo
/etc/pam.d/sudo-i
/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/00
/usr/lib/.build-id/00/87522734e1ad2abd30da54034d5a5404f3b355
/usr/lib/.build-id/27
/usr/lib/.build-id/27/195bc2c3028aae19403c1bf0784d290be0e29c
/usr/lib/.build-id/45
/usr/lib/.build-id/45/9c6a726197d36994bddd366b2bc26b14565198
/usr/lib/.build-id/4e
/usr/lib/.build-id/4e/2b5a7426814dfc6a3ee9bda72354f148a95e60
/usr/lib/.build-id/58
/usr/lib/.build-id/58/0b5ce49094c8f0e2f05e9962356d82f79b9c16
/usr/lib/.build-id/86
/usr/lib/.build-id/86/b9dbbe2e0bdf519abf98cf2233bd7019127e61
/usr/lib/.build-id/89
/usr/lib/.build-id/89/3be69b19e4fe69e78e34baa5c57040c2e46b55
/usr/lib/.build-id/a2
/usr/lib/.build-id/a2/1929948639cf000349997fcaf19e17133445c6
/usr/lib/.build-id/a4
/usr/lib/.build-id/a4/18cd81c4355ee03aa1682fbb65c8412ba05d2c
/usr/lib/.build-id/b9
/usr/lib/.build-id/b9/cc2b4769c870ca935bff1764dfb2b21ede8252
/usr/lib/.build-id/d2
/usr/lib/.build-id/d2/69aed18a648064b55fd7b2412c6e5dd4ffec8f
/usr/lib/.build-id/e8
/usr/lib/.build-id/e8/a1e2fd23c0507e1042c89d865632c298960841
/usr/lib/tmpfiles.d/sudo.conf
/usr/libexec/sudo
/usr/libexec/sudo/audit_json.so
/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/sample_approval.so
/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/example_approval_plugin.py
/usr/share/doc/sudo/examples/example_audit_plugin.py
/usr/share/doc/sudo/examples/example_conversation.py
/usr/share/doc/sudo/examples/example_debugging.py
/usr/share/doc/sudo/examples/example_group_plugin.py
/usr/share/doc/sudo/examples/example_io_plugin.py
/usr/share/doc/sudo/examples/example_policy_plugin.py
/usr/share/doc/sudo/examples/pam.conf
/usr/share/doc/sudo/examples/sudo.conf
/usr/share/doc/sudo/examples/sudo_logsrvd.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/ro/LC_MESSAGES/sudo.mo
/usr/share/locale/ro/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.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 Fedora 36 using yum and [dnf]((/fedora/36/dnf/).