LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

pam_sepermit

PAM module to allow/deny login based on SELinux user state

TLDR

Enable in PAM auth stack
$ auth required pam_sepermit.so
copy
Enable with exclusive login enforcement
$ auth required pam_sepermit.so exclusive
copy
Use custom configuration file
$ auth required pam_sepermit.so conf=/etc/security/custom_sepermit.conf
copy
Add user permit rule to config
$ echo "%wheel" >> /etc/security/sepermit.conf
copy

SYNOPSIS

pam_sepermit.so [conf=file] [exclusive]

DESCRIPTION

pam_sepermit is a PAM module that allows or denies login depending on the SELinux user state. It checks whether SELinux is enforcing and whether the user's SELinux context matches entries in the configuration file. When SELinux is in permissive mode or disabled, the module allows access by default.The module is typically placed in the auth stack and is used to restrict which users can log in on SELinux-enabled systems based on their mapped SELinux identity.

PARAMETERS

exclusive

Only allow one login session at a time for the SELinux user. If another session is active, login is denied.
conf=FILE
Use an alternate configuration file instead of the default /etc/security/sepermit.conf.

CONFIGURATION

/etc/security/sepermit.conf

Configuration file listing SELinux users, UNIX users, or UNIX groups (prefixed with %) that are allowed or denied login. Lines beginning with # are comments. Each line specifies a user or group and optional modifiers like exclusive or ignore.

CAVEATS

Requires SELinux to be enabled and configured on the system. When SELinux is disabled, the module permits all access. The module must be placed correctly in the PAM stack order. Configuration errors can lock out users.

HISTORY

pam_sepermit is part of the Linux-PAM project and was introduced to provide fine-grained login control on SELinux-enabled systems, complementing the broader pam_selinux module.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid