---
name: "semanage_seuser"
section: "3"
platform: "linux"
package: "libsemanage-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/semanage_seuser"
---

# semanage\_seuser(3)

Linux UID to SELinux User Management API

## NAME

semanage\_seuser - Linux UID to SELinux User Management API

## SYNOPSIS

**#include \<semanage/seuser\_record.h\>**\
 **#include \<semanage/seusers\_policy.h\>**\
 **#include \<semanage/seusers\_local.h\>**

This object contains properties associated with a Unix user. Typically many Unix users are mapped to the same SELinux user. See [**semanage\_user**(3)](/semanage_user/3.md) for overview of the SELinux user API.

For details on a specific function, see its manual page.

## Record API Overview

**semanage\_seuser\_create**(3)**-**\
 create a seuser

**semanage\_seuser\_free**(3)**-**\
 release resources for this seuser

**semanage\_seuser\_key\_create**(3)**-**\
 create a key, which can be used to identify a seuser

**semanage\_seuser\_key\_free**(3)**-**\
 release resources for this seuser key

**semanage\_seuser\_key\_extract**(3)**-**\
 create a key matching this seuser

**semanage\_seuser\_clone**(3)**-**\
 create an identical seuser (deep-copy clone)

**semanage\_seuser\_compare**(3)**-**\
 compare this seuser to the provided key

**semanage\_seuser\_compare2**(3)**-**\
 compare this seuser to another

## Properties API Overview

**semanage\_seuser\_get\_name**(3)**-**\
 return the name of this seuser

**semanage\_user\_set\_name**(3)**-**\
 set the name of this seuser

**semanage\_seuser\_get\_sename**(3)**-**\
 return the name of the (SELinux) user mapped to this seuser

**semanage\_user\_set\_sename**(3)**-**\
 set the name of the (SELinux) user mapped to this seuser

**semanage\_user\_get\_mlsrange**(3)**-**\
 return a 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

## Record Store API Overview

[**semanage\_seuser\_modify\_local**(3)](/semanage_seuser_modify_local/3.md)**-**\
 add or update a seuser in the local store

[**semanage\_seuser\_del\_local**(3)](/semanage_seuser_del_local/3.md)**-**\
 delete a seuser from the local store

[**semanage\_seuser\_exists**(3)](/semanage_seuser_exists/3.md)**-**\
 check if a seuser is defined in the persistent policy

[**semanage\_seuser\_exists\_local**(3)](/semanage_seuser_exists_local/3.md)**-**\
 check if a seuser is defined in the local store

[**semanage\_seuser\_query**(3)](/semanage_seuser_query/3.md)**-**\
 query a seuser in the persistent policy

[**semanage\_seuser\_query\_local**(3)](/semanage_seuser_query_local/3.md)**-**\
 query a seuser in the local store

[**semanage\_seuser\_count**(3)](/semanage_seuser_count/3.md)**-**\
 count the number of seusers defined in the persistent policy

[**semanage\_seuser\_count\_local**(3)](/semanage_seuser_count_local/3.md)**-**\
 count the number of seusers defined in the local store

[**semanage\_seuser\_iterate**(3)](/semanage_seuser_iterate/3.md)**-**\
 execute a callback for each seuser in the persistent policy

[**semanage\_seuser\_iterate\_local**(3)](/semanage_seuser_iterate_local/3.md)**-**\
 execute a callback for each seuser in the local store

[**semanage\_seuser\_list**(3)](/semanage_seuser_list/3.md)**-**\
 return an array containing all seusers in the persistent policy

[**semanage\_seuser\_list\_local**(3)](/semanage_seuser_list_local/3.md)**-**\
 return an array containing all seusers in the local store
