semanage_user(3)

๐Ÿ“ฆ
version 3.11 ยท 2 versions
, in centos-stream 10, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ semanage_user(3) โœจ

okay bestie, welcome to the libsemanage API documentation for SELinux user management ๐Ÿ’– this is the page that tells you everything about the semanage_user thing โ€” sit down, grab a strawberry ๐Ÿ“, and let's get into it.


๐ŸŒธ NAME ๐ŸŒธ

semanage_user โ€” the SELinux User Management API ๐Ÿ‘‘


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <semanage/user_record.h>
#include <semanage/users_policy.h>
#include <semanage/users_local.h>

So this object holds all the properties that go with a SELinux user. And here's the vibe: usually many Unix users get mapped to the same SELinux user. Like, one SELinux user, a whole crowd of Unix users, main character energy honestly.

If you want the big-picture overview of the Unix user API, go peek at semanage_seuser(3) ๐Ÿซถ

And if you're here for one specific function? Every function has its own manual page, so go read that one. no cap.


๐Ÿ“‹ Record API Overview

  • semanage_user_create(3) โ€” create a user โœจ
  • semanage_user_free(3) โ€” release resources for this user ๐Ÿงน
  • semanage_user_key_create(3) โ€” create a key, which can be used to identify a user ๐Ÿ”‘
  • semanage_user_key_free(3) โ€” release resources for this user key ๐Ÿซง
  • semanage_user_key_extract(3) โ€” create a key matching this user ๐ŸŽฏ
  • semanage_user_clone(3) โ€” create an identical user (a deep-copy clone, so like a twin, not a copy-paste situation) ๐Ÿ‘ฏ
  • semanage_user_compare(3) โ€” compare this user to the provided key โš–๏ธ
  • semanage_user_compare2(3) โ€” compare this user to another ๐Ÿ’…

๐Ÿ’– Properties API Overview

  • semanage_user_get_name(3) โ€” return the name of this user ๐Ÿท๏ธ
  • semanage_user_set_name(3) โ€” set the name of this user โœ๏ธ
  • semanage_user_get_prefix(3) โ€” return the labeling prefix for this user, which is used to control the contexts of user directories ๐Ÿ“
  • semanage_user_set_prefix(3) โ€” set the labeling prefix for this user ๐Ÿ–Š๏ธ
  • semanage_user_get_mlslevel(3) โ€” return the default MLS level, which gets assigned to this user at login time ๐ŸŒˆ
  • semanage_user_set_mlslevel(3) โ€” set the default MLS level ๐ŸŽš๏ธ
  • semanage_user_get_mlsrange(3) โ€” return the range of valid MLS sensitivities and categories for this user ๐Ÿ“
  • semanage_user_set_mlsrange(3) โ€” set the range of valid MLS sensitivities and categories for this user ๐ŸŽ›๏ธ
  • semanage_user_add_role(3) โ€” add a role to the user's list of valid roles โž•
  • semanage_user_del_role(3) โ€” remove a role from the user's list of valid roles โž–
  • semanage_user_has_role(3) โ€” check if a role is valid for this user โœ…
  • semanage_user_get_num_roles(3) โ€” return the number of valid roles for this user ๐Ÿ”ข
  • semanage_user_get_roles(3) โ€” return an array containing the roles for this user ๐Ÿ“ฆ
  • semanage_user_set_roles(3) โ€” set the roles for this user ๐ŸŽ€

๐Ÿ—„๏ธ Record Store API Overview


okay that's the whole page bestie, every single function accounted for, nothing skipped, we ate and left no crumbs ๐Ÿ’…โœจ

๐Ÿ’Œ cute sign-off time ๐Ÿ’Œ

this iconic lil doc was brought to you by ivg2@cornell.edu, dated 16 March 2006, and it lives in the Libsemanage API documentation section as semanage_user(3). mwah ๐Ÿซถ๐ŸŽ€๐Ÿฆ‹