Current File : //usr/share/selinux/devel/html/logadm.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>logadm_selinux</title>

</head>
<body>

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

<a href="#NAME">NAME</a><br>
<a href="#DESCRIPTION">DESCRIPTION</a><br>
<a href="#BOOLEANS">BOOLEANS</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">logadm_r
&minus; <b>Log administrator role</b> - Security Enhanced
Linux Policy</p>

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


<p style="margin-left:11%; margin-top: 1em">SELinux
supports Roles Based Access Control (RBAC), some Linux roles
are login roles, while other roles need to be transition
into.</p>

<p style="margin-left:11%; margin-top: 1em"><i>Note:</i>
Examples in this man page will use the <b>staff_u</b>
SELinux user.</p>

<p style="margin-left:11%; margin-top: 1em">Non login roles
are usually used for administrative tasks. For example,
tasks that require root privileges. Roles control which
types a user can run processes with. Roles often have
default types assigned to them.</p>

<p style="margin-left:11%; margin-top: 1em">The default
type for the logadm_r role is logadm_t.</p>

<p style="margin-left:11%; margin-top: 1em">The
<b>newrole</b> program to transition directly to this
role.</p>

<p style="margin-left:11%; margin-top: 1em"><b>newrole -r
logadm_r -t logadm_t</b></p>

<p style="margin-left:11%; margin-top: 1em"><b>sudo</b> is
the preferred method to do transition from one role to
another. You setup sudo to transition to logadm_r by adding
a similar line to the /etc/sudoers file.</p>

<p style="margin-left:11%; margin-top: 1em">USERNAME
ALL=(ALL) ROLE=logadm_r TYPE=logadm_t COMMAND</p>

<p style="margin-left:11%; margin-top: 1em">sudo will run
COMMAND as staff_u:logadm_r:logadm_t:LEVEL</p>

<p style="margin-left:11%; margin-top: 1em">When using a
non login role, you need to setup SELinux so that your
SELinux user can reach logadm_r role.</p>

<p style="margin-left:11%; margin-top: 1em">Execute the
following to see all of the assigned SELinux roles:</p>

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

<p style="margin-left:11%; margin-top: 1em">You need to add
logadm_r to the staff_u user. You could setup the staff_u
user to be able to use the logadm_r role with a command
like:</p>

<p style="margin-left:11%; margin-top: 1em"><b>$ semanage
user -m -R &rsquo;staff_r system_r logadm_r&rsquo;
staff_u</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. logadm
policy is extremely flexible and has several booleans that
allow you to manipulate the policy and run logadm with the
tightest access possible.</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
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
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
support NFS home directories, you must turn on the
use_nfs_home_dirs boolean. Disabled by default.</p>

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

<p style="margin-left:11%; margin-top: 1em">If you want to
support SAMBA home directories, you must turn on the
use_samba_home_dirs boolean. Disabled by default.</p>

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

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


<p style="margin-left:11%; margin-top: 1em">The SELinux
process type logadm_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>auditd_etc_t</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>/etc/audit(/.*)?</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>auditd_log_t</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="92%">


<p>/var/log/audit(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/log/audit.log.*</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>auditd_unit_file_t</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="92%">


<p>/usr/lib/systemd/system/auditd.*</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>auditd_var_run_t</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="92%">


<p>/var/run/auditd.pid</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/auditd_sock</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/auditd.state</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/audit_events</p></td></tr>
</table>


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


<p style="margin-left:11%; margin-top: 1em"><b>klogd_var_run_t</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="92%">


<p>/var/run/klogd.pid</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>krb5_host_rcache_t</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="92%">


<p>/var/tmp/krb5_0.rcache2</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/cache/krb5rcache(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/nfs_0</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/DNS_25</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/host_0</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/imap_0</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/HTTP_23</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/HTTP_48</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/ldap_55</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/ldap_487</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/tmp/ldapmap1_0</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>logfile</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="92%">


<p>all log files</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>syslog_conf_t</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="92%">


<p>/etc/syslog.conf</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/etc/rsyslog.conf</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/etc/rsyslog.d(/.*)?</p></td></tr>
</table>


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


<p style="margin-left:11%; margin-top: 1em"><b>syslogd_var_lib_t</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="92%">


<p>/var/lib/r?syslog(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/lib/syslog-ng(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/lib/syslog-ng.persist</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/lib/misc/syslog-ng.persist-?</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>syslogd_var_run_t</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="92%">


<p>/var/run/log(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/syslog-ng.ctl</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/syslog-ng(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/systemd/journal(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/systemd/journal.[^/]+(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/metalog.pid</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/syslogd.pid</p></td></tr>
</table>


<p style="margin-left:11%; margin-top: 1em"><b>systemd_passwd_var_run_t</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="92%">


<p>/var/run/systemd/ask-password(/.*)?</p></td></tr>
<tr valign="top" align="left">
<td width="8%"></td>
<td width="92%">


<p>/var/run/systemd/ask-password-block(/.*)?</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),
logadm(8), semanage(8), restorecon(8), chcon(1),
sepolicy(8), setsebool(8)</p>
<hr>
</body>
</html>