seusers(5)
π seusers β the SELinux GNU/Linux user to SELinux user mapping configuration file π
okay bestie, this is the manual page for seusers, section 5 of the SELinux config docs. sit down, hydrate, and let's get into it β¨
πΈ NAME πΈ
seusers β literally the SELinux GNU/Linux user to SELinux user mapping configuration file. that's the whole vibe. π
π¦ DESCRIPTION π¦
so the seusers file holds a list of GNU/Linux user β SELinux user mappings, and it's used by SELinux-aware login applications like PAM(8). yes, login apps. the ones that decide who you are when you log in. iconic gatekeeping behavior honestly π
selinux_usersconf_path(3) will hand you the active policy path to this file. the default SELinux users mapping file lives at:
/etc/selinux/{SELINUXTYPE}/seusers
where {SELINUXTYPE} is the entry you pulled from the selinux configuration file config (peep selinux_config(5) for that one π«Ά).
and getseuserbyname(3) reads this very file to map a GNU/Linux user or group over to an SELinux user. so like, the whole pipeline is: file here, function there, mapping everywhere π«
π FILE FORMAT π
every single line of the seusers configuration file is shaped like this:
[%group_id]|[user_id]:seuser_id[:range]
and here's what each lil piece means:
group_id|user_idβ the GNU/Linux user id, OR, if it's got the percentage (%) symbol in front of it, then it's a GNU/Linux group id instead. also, you can drop in an optional entry set to__default__as a fall back if you need one πseuser_idβ the SELinux user identity. that's the whole point of the line, no cap.rangeβ the optional level or range for an MLS/MCS policy. optional means optional, bestie.
β¨ EXAMPLE β¨
here's what it actually looks like, chef's kiss:
# ./seusers
system_u:system_u:s0-s15:c0.c255
root:root:s0-s15:c0.c255
fred:user_u:s0
__default__:user_u:s0
%user_group:user_u:s0
see how fred gets user_u, and __default__ catches everybody else? that's the fallback doing its thing. slay π
π SEE ALSO π
Security Enhanced Linux β’ 28-Nov-2011 β’ seusers(5)
and that's the whole page bestie π that version-and-date combo is from back in 28-Nov-2011, brought to you by Security Enhanced Linux β go forth and map your users, you absolute icon πβ¨π¦
π¦ where this page comes from
- alpine 3.24: libselinux-doc 3.10-r1 Β· Public-Domain
- centos-stream 10: libselinux-utils 3.11-3.el10 Β· LicenseRef-Fedora-Public-Domain
- centos-stream 9: libselinux-utils 3.6-5.el9 Β· Public Domain
- debian bookworm: selinux-utils 3.4-1+b6
- debian trixie: selinux-utils 3.8.1-1 Β· LicenseRef-public-domain
- fedora 43: libselinux-utils 3.9-5.fc43 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.10-1.fc44 Β· LicenseRef-Fedora-Public-Domain
- fedora 44: libselinux-utils 3.11-2.fc44 Β· LicenseRef-Fedora-Public-Domain
- nixos 26.05: libselinux 3.10
- nixpkgs unstable: libselinux 3.11
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- opensuse-leap 16.0: selinux-tools 3.8.1-160000.4.1 Β· SUSE-Public-Domain
- ubuntu jammy: selinux-utils 3.3-1build2
- ubuntu noble: selinux-utils 3.5-2ubuntu2 Β· LicenseRef-public-domain
- ubuntu noble: selinux-utils 3.5-2ubuntu2.1 Β· LicenseRef-public-domain
- ubuntu questing: selinux-utils 3.8.1-1build1
- ubuntu resolute: selinux-utils 3.9-4build1 Β· LicenseRef-public-domain
- ubuntu stonking: selinux-utils 3.11-2.1 Β· LicenseRef-public-domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms