Escalating privileges with sudo

The root account is Linux's god account, and it has the ability to perform pretty much any activity on the system. For security reasons, you should use an unprivileged user account for your day-to-day activities and use root only when it's necessary for administration tasks. It's also important to keep the root's password secret; the more people who know its password, the harder it is to keep it secret. A quote by Benjamin Franklin comes to mind: Three can keep a secret if two of them are dead.

If more than one administrator has been tasked with managing a system, keeping root secure can be difficult. sudo solves this problem by giving users a way to execute commands with the privileges of another user (most commonly ...

Get CentOS 7 Server Deployment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.