Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Linux Security and Hardening

You're reading from  Mastering Linux Security and Hardening

Product type Book
Published in Jan 2018
Publisher
ISBN-13 9781788620307
Pages 376 pages
Edition 1st Edition
Languages
Author (1):
Donald A. Tevault Donald A. Tevault
Profile icon Donald A. Tevault

Table of Contents (15) Chapters

Title Page
Packt Upsell
Contributors
Preface
1. Running Linux in a Virtual Environment 2. Securing User Accounts 3. Securing Your Server with a Firewall 4. Encrypting and SSH Hardening 5. Mastering Discretionary Access Control 6. Access Control Lists and Shared Directory Management 7. Implementing Mandatory Access Control with SELinux and AppArmor 8. Scanning, Auditing, and Hardening 9. Vulnerability Scanning and Intrusion Detection 10. Security Tips and Tricks for the Busy Bee 1. Other Books You May Enjoy

Setting up sudo privileges for full administrative users


Before we look at how to limit what users can do, let's first look at how to allow a user to do everything, including logging into the root command prompt. There are a couple of methods for doing that.

Method 1 – adding users to a predefined admin group

The first method, which is the simplest, is to add users to a predefined administrators group and then, if it hasn't already been done, to configure the sudo policy to allow that group to do its job. It's simple enough to do except that different Linux distro families use different admin groups. 

On Unix, BSD, and most Linux systems, you would add users to the wheel group. (Members of the Red Hat family, including CentOS, fall into this category.) When I do the groups command on my CentOS machine, I get this:

[donnie@localhost ~]$ groups
donnie wheel
[donnie@localhost ~]$

This shows that I'm a member of the wheel group. By doing sudo visudo, I'll open the sudo policy file. Scrolling down...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}