Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Linux for System Administrators

You're reading from   Linux for System Administrators Navigate the complex landscape of the Linux OS and command line for effective administration

Arrow left icon
Product type Paperback
Published in Sep 2023
Publisher Packt
ISBN-13 9781803247946
Length 294 pages
Edition 1st Edition
Tools
Arrow right icon
Authors (2):
Arrow left icon
Viorel Rudareanu Viorel Rudareanu
Author Profile Icon Viorel Rudareanu
Viorel Rudareanu
Daniil Baturin Daniil Baturin
Author Profile Icon Daniil Baturin
Daniil Baturin
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1: Linux Basics
2. Chapter 1: Getting to Know Linux FREE CHAPTER 3. Chapter 2: The Shell and Its Commands 4. Chapter 3: The Linux Filesystem 5. Chapter 4: Processes and Process Control 6. Chapter 5: Hardware Discovery 7. Part 2: Configuring and Modifying Linux Systems
8. Chapter 6: Basic System Settings 9. Chapter 7: User and Group Management 10. Chapter 8: Software Installation and Package Repositories 11. Chapter 9: Network Configuration and Debugging 12. Chapter 10: Storage Management 13. Part 3: Linux as a Part of a Larger System
14. Chapter 11: Logging Configuration and Remote Logging 15. Chapter 12: Centralized Authentication 16. Chapter 13: High Availability 17. Chapter 14: Automation with Chef 18. Chapter 15: Security Guidelines and Best Practices 19. Index 20. Other Books You May Enjoy

Understanding the/etc/sudoers file

In this section, let’s see how to use the ordinary user account we created earlier to carry out user administration operations.

We must make a special permissions entry for packt in /etc/sudoers in order to allow it special access:

packt ALL=(ALL) ALL

Let’s break down this line’s syntax:

  • First, we state to which user this rule applies (packt).
  • All hosts that use the same /etc/sudoers file are covered by the rule if the first ALL is present. Since the same file is no longer shared among different machines, this term now refers to the current host.
  • Next, (ALL) ALL informs us that any user may execute any command as the packt user. In terms of functionality, this is similar to (root) ALL.

It is important to manage permissions using groups as it makes life much easier. Imagine how simple it would be to just remove a user from a sudo group rather than removing the user from 100 different places.

...
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 $19.99/month. Cancel anytime