semanage-user(8)
πΈ semanage-user β the SELinux user mapping tool, bestie edition πΈ
okay so real talk, this is the semanage-user(8) page from the semanage family, and it's literally your bestie for wiring up SELinux Users to roles and MLS/MCS levels. no cap. let's get into it π
β¨ NAME β¨
semanage-user β SELinux Policy Management SELinux User mapping tool π«Ά
π SYNOPSIS π
semanage user [-h] [-n] [-N] [-S STORE] [ --add ( -L LEVEL -R ROLES -r
RANGE SEUSER) | --delete SEUSER | --deleteall | --extract | --list [-C]
| --modify ( -L LEVEL -R ROLES -r RANGE SEUSER ) ]
π¦ DESCRIPTION π¦
so semanage is the girl who configures certain elements of SELinux policy without you having to modify or recompile anything from policy sources. she's lowkey doing the most so you don't have to.
and semanage user specifically? she controls the mapping between an SELinux User and the roles and MLS/MCS levels. it's giving matchmaker, honestly. π₯
π OPTIONS π
-h,--helpβ show this help message and exit. the "just tell me what's happening" button π-n,--noheadingβ do NOT print the heading when listing the specified object type. minimalism era β¨-N,--noreloadβ do not reload policy after commit. (normally she does reload, just so we're clear π)-S STORE,--store STOREβ select an alternate SELinux Policy Store to manage. shopping at a different location bestie ποΈ-C,--locallistβ list local customizations only. your personal edits, not the factory defaults πΈ-a,--addβ add a record of the specified object type β-d,--deleteβ delete a record of the specified object type ποΈ-m,--modifyβ modify a record of the specified object type βοΈ-l,--listβ list records of the specified object type π-E,--extractβ extract customizable commands, for use within a transaction. like, exporting the vibe for later π§-D,--deleteallβ remove ALL local customizations. dramatic? maybe. thorough? absolutely π-L LEVEL,--level LEVELβ default SELinux Level for SELinux user,s0is the default. (MLS/MCS Systems only)-r RANGE,--range RANGEβ MLS/MCS Security Range (MLS/MCS Systems only). the SELinux Range for SELinux login mapping defaults to the SELinux user record range. the SELinux Range for SELinux user defaults tos0.-R [ROLES],--roles [ROLES]β SELinux Roles. bestie, you must enclose multiple roles within quotes, separated by spaces. OR you can specify-Rmultiple times. both slay π
heads up:-Land-rare for MLS/MCS systems only. don't come for me if you're on a non-MLS system, that's just what the page says π
π EXAMPLE π
List SELinux users
# semanage user -l
Modify groups for staff_u user
# semanage user -m -R "system_r unconfined_r staff_r" staff_u
Assign user topsecret_u role staff_r and range s0-TopSecret
# semanage user -a -R "staff_r" -rs0-TopSecret topsecret_u
β SEE ALSO β
selinux(8), semanage(8), semanage-login(8)
π AUTHOR π
this man page was written by Daniel Walsh <dwalsh@redhat.com> β we love a legend π«Ά
okay that's the whole page, and the date stamp on this iconic piece of work is 20130617, from the semanage-user(8) manual itself. periodt. go configure your SELinux users, main character π
β¨
π¦ where this page comes from
- centos-stream 10: policycoreutils-python-utils 3.10-2.el10 Β· GPL-2.0-or-later
- centos-stream 10: policycoreutils-python-utils 3.11-1.el10 Β· GPL-2.0-or-later
- centos-stream 9: policycoreutils-python-utils 3.6-7.el9 Β· GPL-2.0-or-later
- centos-stream 9: policycoreutils-python-utils 3.6-9.el9 Β· GPL-2.0-or-later
- fedora 43: policycoreutils-python-utils 3.9-5.fc43 Β· GPL-2.0-or-later
- fedora 43: policycoreutils-python-utils 3.9-7.fc43 Β· GPL-2.0-or-later
- fedora 44: policycoreutils-python-utils 3.10-1.fc44 Β· GPL-2.0-or-later
- fedora 44: policycoreutils-python-utils 3.11-2.fc44 Β· GPL-2.0-or-later
- nixos 26.05: selinux-python 3.10
- nixpkgs unstable: selinux-python 3.10
- opensuse-leap 16.0: policycoreutils-python-utils 3.8.1-160000.5.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms