Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Linux Security and Hardening - Third Edition

You're reading from  Mastering Linux Security and Hardening - Third Edition

Product type Book
Published in Feb 2023
Publisher Packt
ISBN-13 9781837630516
Pages 618 pages
Edition 3rd Edition
Languages
Author (1):
Donald A. Tevault Donald A. Tevault
Profile icon Donald A. Tevault

Table of Contents (22) Chapters

Preface 1. Section 1: Setting up a Secure Linux System
2. Running Linux in a Virtual Environment 3. Securing Administrative User Accounts 4. Securing Normal User Accounts 5. Securing Your Server with a Firewall – Part 1 6. Securing Your Server with a Firewall — Part 2 7. Encryption Technologies 8. SSH Hardening 9. Section 2: Mastering File and Directory Access Control (DAC)
10. Mastering Discretionary Access Control 11. Access Control Lists and Shared Directory Management 12. Section 3: Advanced System Hardening Techniques
13. Implementing Mandatory Access Control with SELinux and AppArmor 14. Kernel Hardening and Process Isolation 15. Scanning, Auditing, and Hardening 16. Logging and Log Security 17. Vulnerability Scanning and Intrusion Detection 18. Prevent Unwanted Programs from Running 19. Security Tips and Tricks for the Busy Bee 20. Other Books You May Enjoy
21. Index

Configuring default expiry data for useradd for Red Hat-type systems only

The /etc/default/useradd file has the rest of the default settings. In this case, we’ll look at the one from the AlmaLinux 9 machine:

Ubuntu also has the useradd configuration file, but it doesn’t work. No matter how you configure it, the Ubuntu version of useradd just won’t read it. So, the write-up about this file only applies to Red Hat-type systems.

# useradd defaults file
GROUP=100
HOME=/home 
INACTIVE=-1 
EXPIRE= 
SHELL=/bin/bash 
SKEL=/etc/skel 
CREATE_MAIL_SPOOL=yes

The EXPIRE= line sets the default expiration date for new user accounts. By default, there is no default expiration date. INACTIVE=-1 means that user accounts won’t be automatically locked out after the users’ passwords expire. If we set this to a positive number, then any new users will have that many days to change an expired password before the account gets locked. To change the...

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}