This is a draft document that was built and uploaded automatically. It may document beta software and be incomplete or even incorrect. Use this document at your own risk.

Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
ContentsContents
Security and Hardening Guide
  1. Preface
  2. 1 Security and confidentiality
  3. I Authentication
    1. 2 Authentication with PAM
    2. 3 Using NIS
    3. 4 Setting up authentication clients using YaST
    4. 5 LDAP with 389 Directory Server
    5. 6 Network authentication with Kerberos
    6. 7 Authenticating with Microsoft Entra ID using Himmelblau
    7. 8 Active Directory support
    8. 9 Setting up a freeRADIUS server
  4. II Local security
    1. 10 Physical security
    2. 11 Software management
    3. 12 File management
    4. 13 Encrypting partitions and files
    5. 14 Storage encryption for hosted applications with cryptctl
    6. 15 User management
    7. 16 Restricting cron and at
    8. 17 Spectre/Meltdown checker
    9. 18 Configuring security settings with YaST
    10. 19 The Polkit authentication framework
    11. 20 Access control lists in Linux
    12. 21 Intrusion detection with AIDE
  5. III Network security
    1. 22 X Window System and X authentication
    2. 23 Securing network operations with OpenSSH
    3. 24 Masquerading and firewalls
    4. 25 Configuring a VPN server
    5. 26 Managing a PKI with XCA, X certificate and key manager
    6. 27 Improving network security with sysctl variables
  6. IV Confining privileges with AppArmor
    1. 28 Introducing AppArmor
    2. 29 Getting started
    3. 30 Immunizing programs
    4. 31 Profile components and syntax
    5. 32 AppArmor profile repositories
    6. 33 Building and managing profiles with YaST
    7. 34 Building profiles from the command line
    8. 35 Profiling your Web applications using ChangeHat
    9. 36 Confining users with pam_apparmor
    10. 37 Managing profiled applications
    11. 38 Support
    12. 39 AppArmor glossary
  7. V SELinux
    1. 40 Configuring SELinux
  8. VI The Linux Audit Framework
    1. 41 Understanding Linux audit
    2. 42 Setting up the Linux audit framework
    3. 43 Introducing an audit rule set
    4. 44 Useful resources
  9. A GNU licenses
Navigation
openSUSE Leap 15.7

Security and Hardening Guide

Abstract

This guide introduces basic concepts of system security and describes the usage of security software included with the product, such as AppArmor, SELinux, or the auditing system. The guide also supports system administrators in hardening an installation.

Publication Date: July 09, 2026
Preface
Available documentation
Improving the documentation
Documentation conventions
1 Security and confidentiality
1.1 Overview
1.2 Passwords
1.3 Backups
1.4 System integrity
1.5 File access
1.6 Networking
1.7 Software vulnerabilities
1.8 Malware
1.9 Important security tips
1.10 Reporting security issues
I Authentication
2 Authentication with PAM
2.1 What is PAM?
2.2 Structure of a PAM configuration file
2.3 The PAM configuration of sshd
2.4 Configuration of PAM modules
2.5 Configuring PAM using pam-config
2.6 Manually configuring PAM
2.7 Configuring U2F keys for local login
2.8 More information
3 Using NIS
3.1 Configuring NIS servers
3.2 Configuring NIS clients
4 Setting up authentication clients using YaST
4.1 Configuring an authentication client with YaST
4.2 SSSD
5 LDAP with 389 Directory Server
5.1 Structure of an LDAP directory tree
5.2 Creating and managing a Docker container for 389 Directory Server
5.3 Installing 389 Directory Server
5.4 Firewall configuration
5.5 Backing up and restoring 389 Directory Server
5.6 Managing LDAP users and groups
5.7 Managing plug-ins
5.8 Using SSSD to manage LDAP authentication
5.9 Migrating to 389 Directory Server from OpenLDAP
5.10 Importing TLS server certificates and keys
5.11 Setting up replication
5.12 Synchronizing with Microsoft Active Directory
5.13 More information
6 Network authentication with Kerberos
6.1 Conceptual overview
6.2 Kerberos terminology
6.3 How Kerberos works
6.4 User view of Kerberos
6.5 Installing and administering Kerberos
6.6 Kerberos and NFS
6.7 More information
7 Authenticating with Microsoft Entra ID using Himmelblau
7.1 Installing Himmelblau
7.2 Configuring Himmelblau authentication
7.3 Verifying the configuration
7.4 Restricting who can sign in
7.5 Enabling Intune policy enforcement
8 Active Directory support
8.1 Integrating Linux and Active Directory environments
8.2 Background information for Linux Active Directory support
8.3 Configuring a Linux client for Active Directory
8.4 Logging in to an Active Directory domain
8.5 Changing passwords
8.6 Active Directory certificate auto-enrollment
9 Setting up a freeRADIUS server
9.1 Installation and testing on openSUSE Leap
II Local security
10 Physical security
10.1 System locks
10.2 Locking down the BIOS
10.3 Security via the boot loaders
10.4 Retiring Linux servers with sensitive data
10.5 Restricting access to removable media
10.6 System protection with enforced USB device authorization via USBGuard
11 Software management
11.1 Removing unnecessary software packages (RPMs)
11.2 Patching Linux systems
12 File management
12.1 Disk partitions
12.2 Modifying permissions of certain system files
12.3 Changing home directory permissions from 755 to 700
12.4 Default umask
12.5 SUID/SGID files
12.6 World-writable files
12.7 Orphaned or unowned files
13 Encrypting partitions and files
13.1 Setting up an encrypted file system with YaST
13.2 Encrypting files with GPG
13.3 Encrypting files with Rage
14 Storage encryption for hosted applications with cryptctl
14.1 Setting up a cryptctl server
14.2 Setting up a cryptctl client
14.3 Configuring /etc/fstab for LUKS volumes
14.4 Checking partition unlock status using server-side commands
14.5 Unlocking encrypted partitions manually
14.6 Maintenance downtime procedure
14.7 Setting up an HA environment for cryptctl-server service
14.8 More information
15 User management
15.1 Various account checks
15.2 Enabling password aging
15.3 Stronger password enforcement
15.4 Password and login management with PAM
15.5 Restricting root logins
15.6 Restricting sudo users
15.7 Setting an inactivity timeout for interactive shell sessions
15.8 Preventing accidental denial of service
15.9 Displaying login banners
15.10 Connection accounting utilities
16 Restricting cron and at
16.1 Restricting the cron daemon
16.2 Restricting the at scheduler
17 Spectre/Meltdown checker
17.1 Using spectre-meltdown-checker
17.2 More information
18 Configuring security settings with YaST
18.1 Security overview
18.2 Predefined security configurations
18.3 Password settings
18.4 Boot settings
18.5 Login settings
18.6 User addition
18.7 Miscellaneous settings
19 The Polkit authentication framework
19.1 Conceptual overview
19.2 Authorization types
19.3 Querying privileges
19.4 Modifying Polkit configuration
19.5 Restoring the SUSE default privileges
20 Access control lists in Linux
20.1 Traditional file permissions
20.2 Advantages of ACLs
20.3 Definitions
20.4 Handling ACLs
20.5 ACL support in applications
20.6 More information
21 Intrusion detection with AIDE
21.1 Why use AIDE?
21.2 Setting up an AIDE database
21.3 Local AIDE checks
21.4 System independent checking
21.5 More information
III Network security
22 X Window System and X authentication
23 Securing network operations with OpenSSH
23.1 OpenSSH overview
23.2 Server hardening
23.3 Password authentication
23.4 Managing user and host encryption keys
23.5 Rotating host keys
23.6 Public key authentication
23.7 Passphrase-less public key authentication
23.8 OpenSSH certificate authentication
23.9 Automated public key logins with gnome-keyring
23.10 Automated public key logins with ssh-agent
23.11 Changing an SSH private key passphrase
23.12 Retrieving a key fingerprint
23.13 Starting X11 applications on a remote host
23.14 Agent forwarding
23.15 scp—secure copy
23.16 sftp—secure file transfer
23.17 Port forwarding (SSH tunneling)
23.18 More information
23.19 Stopping SSH brute force attacks with Fail2Ban
24 Masquerading and firewalls
24.1 Packet filtering with iptables
24.2 Masquerading basics
24.3 Firewalling basics
24.4 firewalld
24.5 Migrating from SuSEfirewall2
24.6 More information
25 Configuring a VPN server
25.1 Conceptual overview
25.2 Setting up a simple test scenario
25.3 Setting up your VPN server using a certificate authority
25.4 Setting up a VPN server or client using YaST
25.5 More information
26 Managing a PKI with XCA, X certificate and key manager
26.1 Installing XCA
26.2 Creating a new PKI
27 Improving network security with sysctl variables
IV Confining privileges with AppArmor
28 Introducing AppArmor
28.1 AppArmor components
28.2 Background information on AppArmor profiling
29 Getting started
29.1 Installing AppArmor
29.2 Enabling and disabling AppArmor
29.3 Choosing applications to profile
29.4 Building and modifying profiles
29.5 Updating your profiles
30 Immunizing programs
30.1 Introducing the AppArmor framework
30.2 Determining programs to immunize
30.3 Immunizing cron jobs
30.4 Immunizing network applications
31 Profile components and syntax
31.1 Breaking an AppArmor profile into its parts
31.2 Profile types
31.3 Include statements
31.4 Capability entries (POSIX.1e)
31.5 Network access control
31.6 Profile names, flags, paths, and globbing
31.7 File permission access modes
31.8 Mount rules
31.9 Pivot root rules
31.10 PTrace rules
31.11 Signal rules
31.12 Execute modes
31.13 Resource limit control
31.14 Auditing rules
32 AppArmor profile repositories
33 Building and managing profiles with YaST
33.1 Manually adding a profile
33.2 Editing profiles
33.3 Deleting a profile
33.4 Managing AppArmor
34 Building profiles from the command line
34.1 Checking the AppArmor status
34.2 Building AppArmor profiles
34.3 Adding or creating an AppArmor profile
34.4 Editing an AppArmor profile
34.5 Unloading unknown AppArmor profiles
34.6 Deleting an AppArmor profile
34.7 Two methods of profiling
34.8 Important file names and directories
35 Profiling your Web applications using ChangeHat
35.1 Configuring Apache for mod_apparmor
35.2 Managing ChangeHat-aware applications
36 Confining users with pam_apparmor
37 Managing profiled applications
37.1 Reacting to security event rejections
37.2 Maintaining your security profiles
38 Support
38.1 Updating AppArmor online
38.2 Using the man pages
38.3 More information
38.4 Troubleshooting
38.5 Reporting bugs for AppArmor
39 AppArmor glossary
V SELinux
40 Configuring SELinux
40.1 Why use SELinux?
40.2 SELinux policy overview
40.3 Installing SELinux packages
40.4 Installing an SELinux policy
40.5 Putting SELinux into permissive mode
40.6 Putting SELinux into enforcing mode
40.7 Configuring SELinux
40.8 Managing SELinux
40.9 Troubleshooting
VI The Linux Audit Framework
41 Understanding Linux audit
41.1 Introducing the components of Linux audit
41.2 Configuring the audit daemon
41.3 Controlling the audit system using auditctl
41.4 Passing parameters to the audit system
41.5 Understanding the audit logs and generating reports
41.6 Querying the audit daemon logs with ausearch
41.7 Analyzing processes with autrace
41.8 Visualizing audit data
41.9 Relaying audit event notifications
42 Setting up the Linux audit framework
42.1 Determining the components to audit
42.2 Configuring the audit daemon
42.3 Enabling audit for system calls
42.4 Setting up audit rules
42.5 Configuring audit reports
42.6 Configuring log visualization
43 Introducing an audit rule set
43.1 Adding basic audit configuration parameters
43.2 Adding watches on audit log files and configuration files
43.3 Monitoring file system objects
43.4 Monitoring security configuration files and databases
43.5 Monitoring miscellaneous system calls
43.6 Filtering system call arguments
43.7 Managing audit event records using keys
44 Useful resources
A GNU licenses
A.1 GNU Free Documentation License
List of Examples
2.1 PAM configuration for sshd (/etc/pam.d/sshd)
2.2 Default configuration for the auth section (common-auth)
2.3 Default configuration for the account section (common-account)
2.4 Default configuration for the password section (common-password)
2.5 Default configuration for the session section (common-session)
2.6 pam_env.conf
5.1 Excerpt from CN=schema
5.2 Minimal 389 Directory Server instance configuration file
5.3 A .dsrc file for local administration
5.4 Two supplier replicas
5.5 Four supplier replicas
5.6 Six replicas
5.7 Six replicas with read-only consumers
6.1 Example KDC configuration, /etc/krb5.conf
10.1 Configuration
23.1 Example sshd_config
24.1 Callback port configuration for the nfs kernel module in /etc/modprobe.d/60-nfs.conf
24.2 Commands to define a new firewalld RPC service for NFS
25.1 VPN server configuration file
25.2 VPN client configuration file
29.1 Output of aa-unconfined
34.1 Learning mode exception: controlling access to specific resources
34.2 Learning mode exception: defining permissions for an entry
40.1 Security context settings using ls -Z
40.2 Verifying that SELinux is functional
40.3 Getting a list of booleans and verifying policy access
40.4 Getting file context information
40.5 The default context for directories in the root directory
40.6 Showing SELinux settings for processes with ps Zaux
40.7 Viewing default file contexts
40.8 Example lines from /var/log/audit/audit.log
40.9 Analyzing audit messages
40.10 Viewing which lines deny access
40.11 Creating a policy module allowing an action previously denied
41.1 Default /etc/audit/auditd.conf
41.2 Example output of auditctl -s
41.3 Example audit rules—audit system parameters
41.4 Example audit rules—file system auditing
41.5 Example audit rules—system call auditing
41.6 Deleting audit rules and events
41.7 Listing rules with auditctl -l
41.8 A simple audit event—viewing the audit log
41.9 An advanced audit event—login via SSH
41.10 Example /etc/audit/auditd.conf
41.11 Example /etc/audit/plugins.d/syslog.conf

Copyright © 2006–2026 SUSE LLC and contributors. All rights reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled GNU Free Documentation License.

For SUSE trademarks, see https://www.suse.com/company/legal/. All third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its affiliates. Asterisks (*) denote third-party trademarks.

All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its affiliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof.

Print this page