Current File : //kunden/usr/share/selinux/devel/html/sysadm.html
<!-- Creator     : groff version 1.22.4 -->
<!-- CreationDate: Thu Apr 10 20:00:00 2025 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content="groff -Thtml, see www.gnu.org">
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<meta name="Content-Style" content="text/css">
<style type="text/css">
       p       { margin-top: 0; margin-bottom: 0; vertical-align: top }
       pre     { margin-top: 0; margin-bottom: 0; vertical-align: top }
       table   { margin-top: 0; margin-bottom: 0; vertical-align: top }
       h1      { text-align: center }
</style>
<title>sysadm_selinux</title>

</head>
<body>

<h1 align="center">sysadm_selinux</h1>

<a href="#NAME">NAME</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#USER DESCRIPTION">USER DESCRIPTION</a><br>
<a href="#SUDO">SUDO</a><br>
<a href="#X WINDOWS LOGIN">X WINDOWS LOGIN</a><br>
<a href="#NETWORK">NETWORK</a><br>
<a href="#BOOLEANS">BOOLEANS</a><br>
<a href="#HOME_EXEC">HOME_EXEC</a><br>
<a href="#TRANSITIONS">TRANSITIONS</a><br>
<a href="#MANAGED FILES">MANAGED FILES</a><br>
<a href="#COMMANDS">COMMANDS</a><br>
<a href="#AUTHOR">AUTHOR</a><br>
<a href="#SEE ALSO">SEE ALSO</a><br>

<hr>


<h2>NAME
<a name="NAME"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">sysadm_u
&minus; <b>General system administration role</b> - Security
Enhanced Linux Policy</p>

<h2>DESCRIPTION
<a name="DESCRIPTION"></a>
</h2>



<p style="margin-left:11%; margin-top: 1em"><b>sysadm_u</b>
is an SELinux User defined in the SELinux policy. SELinux
users have default roles, <b>sysadm_r</b>. The default role
has a default type, <b>sysadm_t</b>, associated with it.</p>

<p style="margin-left:11%; margin-top: 1em">The SELinux
user will usually login to a system with a context that
looks like:</p>


<p style="margin-left:11%; margin-top: 1em"><b>sysadm_u:sysadm_r:sysadm_t:s0
- s0:c0.c1023</b></p>

<p style="margin-left:11%; margin-top: 1em">Linux users are
automatically assigned an SELinux users at login. Login
programs use the SELinux User to assign initial context to
the user&rsquo;s shell.</p>

<p style="margin-left:11%; margin-top: 1em">SELinux policy
uses the context to control the user&rsquo;s access.</p>

<p style="margin-left:11%; margin-top: 1em">By default all
users are assigned to the SELinux user via the
<b>__default__</b> flag</p>

<p style="margin-left:11%; margin-top: 1em">On Targeted
policy systems the <b>__default__</b> user is assigned to
the <b>unconfined_u</b> SELinux user.</p>

<p style="margin-left:11%; margin-top: 1em">You can list
all Linux User to SELinux user mapping using:</p>

<p style="margin-left:11%; margin-top: 1em"><b>semanage
login -l</b></p>

<p style="margin-left:11%; margin-top: 1em">If you wanted
to change the default user mapping to use the sysadm_u user,
you would execute:</p>

<p style="margin-left:11%; margin-top: 1em"><b>semanage
login -m -s sysadm_u __default__</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
map the one Linux user (joe) to the SELinux user sysadm, you
would execute:</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
login -a -s sysadm_u joe</b></p>

<h2>USER DESCRIPTION
<a name="USER DESCRIPTION"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The SELinux
user sysadm_u is an admin user. It means that a mapped Linux
user to this SELinux user is intended for administrative
actions. Usually this is assigned to a root Linux user.</p>

<h2>SUDO
<a name="SUDO"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The SELinux
user sysadm can execute sudo.</p>

<p style="margin-left:11%; margin-top: 1em">You can set up
sudo to allow sysadm to transition to an administrative
domain:</p>

<p style="margin-left:11%; margin-top: 1em">Add one or more
of the following record to sudoers using visudo.</p>

<p style="margin-left:11%; margin-top: 1em">USERNAME
ALL=(ALL) ROLE=user_r TYPE=user_t COMMAND <br>
sudo will run COMMAND as sysadm_u:user_r:user_t:LEVEL</p>

<p style="margin-left:11%; margin-top: 1em">You might also
need to add one or more of these new roles to your SELinux
user record.</p>

<p style="margin-left:11%; margin-top: 1em">List the
SELinux roles your SELinux user can reach by executing:</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -l |grep selinux_name</b></p>

<p style="margin-left:11%; margin-top: 1em">Modify the
roles list and add sysadm_r to this list.</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -m -R &rsquo;sysadm_r user_r staff_r secadm_r
auditadm_r&rsquo; sysadm_u</b></p>

<p style="margin-left:11%; margin-top: 1em">For more
details you can see semanage man page.</p>

<p style="margin-left:11%; margin-top: 1em">USERNAME
ALL=(ALL) ROLE=staff_r TYPE=staff_t COMMAND <br>
sudo will run COMMAND as sysadm_u:staff_r:staff_t:LEVEL</p>

<p style="margin-left:11%; margin-top: 1em">You might also
need to add one or more of these new roles to your SELinux
user record.</p>

<p style="margin-left:11%; margin-top: 1em">List the
SELinux roles your SELinux user can reach by executing:</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -l |grep selinux_name</b></p>

<p style="margin-left:11%; margin-top: 1em">Modify the
roles list and add sysadm_r to this list.</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -m -R &rsquo;sysadm_r user_r staff_r secadm_r
auditadm_r&rsquo; sysadm_u</b></p>

<p style="margin-left:11%; margin-top: 1em">For more
details you can see semanage man page.</p>

<p style="margin-left:11%; margin-top: 1em">USERNAME
ALL=(ALL) ROLE=secadm_r TYPE=secadm_t COMMAND <br>
sudo will run COMMAND as
sysadm_u:secadm_r:secadm_t:LEVEL</p>

<p style="margin-left:11%; margin-top: 1em">You might also
need to add one or more of these new roles to your SELinux
user record.</p>

<p style="margin-left:11%; margin-top: 1em">List the
SELinux roles your SELinux user can reach by executing:</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -l |grep selinux_name</b></p>

<p style="margin-left:11%; margin-top: 1em">Modify the
roles list and add sysadm_r to this list.</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -m -R &rsquo;sysadm_r user_r staff_r secadm_r
auditadm_r&rsquo; sysadm_u</b></p>

<p style="margin-left:11%; margin-top: 1em">For more
details you can see semanage man page.</p>

<p style="margin-left:11%; margin-top: 1em">USERNAME
ALL=(ALL) ROLE=auditadm_r TYPE=auditadm_t COMMAND <br>
sudo will run COMMAND as
sysadm_u:auditadm_r:auditadm_t:LEVEL</p>

<p style="margin-left:11%; margin-top: 1em">You might also
need to add one or more of these new roles to your SELinux
user record.</p>

<p style="margin-left:11%; margin-top: 1em">List the
SELinux roles your SELinux user can reach by executing:</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -l |grep selinux_name</b></p>

<p style="margin-left:11%; margin-top: 1em">Modify the
roles list and add sysadm_r to this list.</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -m -R &rsquo;sysadm_r user_r staff_r secadm_r
auditadm_r&rsquo; sysadm_u</b></p>

<p style="margin-left:11%; margin-top: 1em">For more
details you can see semanage man page.</p>

<p style="margin-left:11%; margin-top: 1em">The SELinux
type sysadm_t is not allowed to execute sudo.</p>

<h2>X WINDOWS LOGIN
<a name="X WINDOWS LOGIN"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The SELinux
user sysadm_u is able to X Windows login.</p>

<h2>NETWORK
<a name="NETWORK"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The SELinux
user sysadm_u is able to listen on the following tcp
ports.</p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
&gt;= 512 and &lt; 1024</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>32768-60999</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
without defined types</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>1716</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
&gt;= 1024</b></p>

<p style="margin-left:11%;">The SELinux user sysadm_u is
able to connect to the following tcp <br>
ports.</p>


<p style="margin-left:22%; margin-top: 1em"><b>8955</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>53,853</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all
ports</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>389,636,3268,3269,7389</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
without defined types</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>32768-60999</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
&lt; 1024</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>9080</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>88,750,4444</b></p>

<p style="margin-left:11%;">The SELinux user sysadm_u is
able to listen on the following udp ports.</p>

<p style="margin-left:22%; margin-top: 1em"><b>123</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
without defined types</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>32768-60999</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
&gt;= 1024</b></p>

<p style="margin-left:11%;">The SELinux user sysadm_u is
able to connect to the following tcp <br>
ports.</p>


<p style="margin-left:22%; margin-top: 1em"><b>8955</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>53,853</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all
ports</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>389,636,3268,3269,7389</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
without defined types</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>32768-60999</b></p>

<p style="margin-left:22%; margin-top: 1em"><b>all ports
&lt; 1024</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>9080</b></p>


<p style="margin-left:22%; margin-top: 1em"><b>88,750,4444</b></p>

<h2>BOOLEANS
<a name="BOOLEANS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">SELinux policy
is customizable based on least access required. sysadm
policy is extremely flexible and has several booleans that
allow you to manipulate the policy and run sysadm with the
tightest access possible.</p>

<p style="margin-left:11%; margin-top: 1em">If you want to
determine whether crond can execute jobs in the user domain
as opposed to the the generic cronjob domain, you must turn
on the cron_userdomain_transition boolean. Enabled by
default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
cron_userdomain_transition 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
deny all system processes and Linux users to use bluetooth
wireless technology, you must turn on the deny_bluetooth
boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
deny_bluetooth 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
deny user domains applications to map a memory region as
both executable and writable, this is dangerous and the
executable should be reported in bugzilla, you must turn on
the deny_execmem boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
deny_execmem 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
deny any process from ptracing or debugging any other
processes, you must turn on the deny_ptrace boolean.
Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
deny_ptrace 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
allow all domains to execute in fips_mode, you must turn on
the fips_mode boolean. Enabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
fips_mode 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
determine whether calling user domains can execute Git
daemon in the git_session_t domain, you must turn on the
git_session_users boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
git_session_users 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
allow system to run with NIS, you must turn on the
nis_enabled boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
nis_enabled 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
determine whether calling user domains can execute Polipo
daemon in the polipo_session_t domain, you must turn on the
polipo_session_users boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
polipo_session_users 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
disable kernel module loading, you must turn on the
secure_mode_insmod boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
secure_mode_insmod 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
allow unconfined executables to make their stack executable.
This should never, ever be necessary. Probably indicates a
badly coded executable, but could indicate an attack. This
executable should be reported in bugzilla, you must turn on
the selinuxuser_execstack boolean. Enabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
selinuxuser_execstack 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
allow user to r/w files on filesystems that do not have
extended attributes (FAT, CDROM, FLOPPY), you must turn on
the selinuxuser_rw_noexattrfile boolean. Enabled by
default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
selinuxuser_rw_noexattrfile 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
allow users to run TCP servers (bind to ports and accept
connection from the same domain and outside users) disabling
this forces FTP passive mode and may change other protocols,
you must turn on the selinuxuser_tcp_server boolean.
Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
selinuxuser_tcp_server 1</b></p>

<p style="margin-left:11%; margin-top: 1em">If you want to
allow users to run UDP servers (bind to ports and accept
connection from the same domain and outside users) disabling
this may break avahi discovering services on the network and
other udp related services, you must turn on the
selinuxuser_udp_server boolean. Disabled by default.</p>

<p style="margin-left:11%; margin-top: 1em"><b>setsebool -P
selinuxuser_udp_server 1</b></p>

<h2>HOME_EXEC
<a name="HOME_EXEC"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The SELinux
user sysadm_u is able execute home content files.</p>

<h2>TRANSITIONS
<a name="TRANSITIONS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">Three things
can happen when sysadm_t attempts to execute a program.</p>

<p style="margin-left:11%; margin-top: 1em"><b>1.</b>
SELinux Policy can deny sysadm_t from executing the
program.</p>

<p style="margin-left:11%; margin-top: 1em"><b>2.</b>
SELinux Policy can allow sysadm_t to execute the program in
the <br>
current user type.</p>

<p style="margin-left:22%; margin-top: 1em">Execute the
following to see the types that the SELinux user sysadm_t
can execute without transitioning:</p>

<p style="margin-left:22%; margin-top: 1em"><b>sesearch -A
-s sysadm_t -c file -p execute_no_trans</b></p>

<p style="margin-left:11%; margin-top: 1em"><b>3.</b>
SELinux can allow sysadm_t to execute the program and
transition to <br>
a new type.</p>

<p style="margin-left:22%; margin-top: 1em">Execute the
following to see the types that the SELinux user sysadm_t
can execute and transition:</p>

<p style="margin-left:22%; margin-top: 1em"><b>$ sesearch
-A -s sysadm_t -c process -p transition</b></p>

<h2>MANAGED FILES
<a name="MANAGED FILES"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">The SELinux
process type sysadm_t can manage files labeled with the
following file types. The paths listed are the default paths
for these file types. Note the processes UID still need to
have DAC permissions.</p>


<p style="margin-left:11%; margin-top: 1em"><b>file_type</b></p>

<table width="100%" border="0" rules="none" frame="void"
       cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
<td width="8%"></td>
<td width="7%"></td>
<td width="85%">


<p>all files on the system</p></td></tr>
</table>

<h2>COMMANDS
<a name="COMMANDS"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em"><b>semanage
fcontext</b> can also be used to manipulate default file
context mappings.</p>

<p style="margin-left:11%; margin-top: 1em"><b>semanage
permissive</b> can also be used to manipulate whether or not
a process type is permissive.</p>

<p style="margin-left:11%; margin-top: 1em"><b>semanage
module</b> can also be used to enable/disable/install/remove
policy modules.</p>

<p style="margin-left:11%; margin-top: 1em"><b>semanage
boolean</b> can also be used to manipulate the booleans</p>


<p style="margin-left:11%; margin-top: 1em"><b>system-config-selinux</b>
is a GUI tool available to customize SELinux policy
settings.</p>

<h2>AUTHOR
<a name="AUTHOR"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">This manual
page was auto-generated using <b>sepolicy manpage .</b></p>

<h2>SEE ALSO
<a name="SEE ALSO"></a>
</h2>


<p style="margin-left:11%; margin-top: 1em">selinux(8),
sysadm(8), semanage(8), restorecon(8), chcon(1),
sepolicy(8), setsebool(8), sysadm_dbusd_selinux(8),
sysadm_dbusd_selinux(8), sysadm_gkeyringd_selinux(8),
sysadm_gkeyringd_selinux(8), sysadm_passwd_selinux(8),
sysadm_passwd_selinux(8), sysadm_screen_selinux(8),
sysadm_screen_selinux(8), sysadm_seunshare_selinux(8),
sysadm_seunshare_selinux(8), sysadm_ssh_agent_selinux(8),
sysadm_ssh_agent_selinux(8), sysadm_su_selinux(8),
sysadm_su_selinux(8), sysadm_sudo_selinux(8),
sysadm_sudo_selinux(8)</p>
<hr>
</body>
</html>