Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

newrole(1) [debian man page]

NEWROLE(1)								NSA								NEWROLE(1)

NAME
newrole - run a shell with a new SELinux role SYNOPSIS
newrole [-r|--role] ROLE [-t|--type] TYPE [-l|--level] LEVEL [-- [ARGS]...] DESCRIPTION
Run a new shell in a new context. The new context is derived from the old context in which newrole is originally executed. If the -r or --role option is specified, then the new context will have the role specified by ROLE. If the -t or --type option is specified, then the new context will have the type (domain) specified by TYPE. If a role is specified, but no type is specified, the default type is derived from the specified role. If the -l or --level option is specified, then the new context will have the sensitivity level specified by LEVEL. If LEVEL is a range, the new context will have the sensitivity level and clearance specified by that range. Additional arguments ARGS may be provided after a -- option, in which case they are supplied to the new shell. In particular, an argument of -- -c will cause the next argument to be treated as a command by most command interpreters. If a command argument is specified to newrole and the command name is found in /etc/selinux/newrole_pam.conf, then the pam service name listed in that file for the command will be used rather than the normal newrole pam configuration. This allows for per-command pam config- uration when invoked via newrole, e.g. to skip the interactive re-authentication phase. The new shell will be the shell specified in the user's entry in the /etc/passwd file. The -V or --version shows the current version of newrole EXAMPLE
Changing role: # id -Z staff_u:staff_r:staff_t:SystemLow-SystemHigh # newrole -r sysadm_r # id -Z staff_u:sysadm_r:sysadm_t:SystemLow-SystemHigh Changing sensitivity only: # id -Z staff_u:sysadm_r:sysadm_t:Unclassified-SystemHigh # newrole -l Secret # id -Z staff_u:sysadm_r:sysadm_t:Secret-SystemHigh Changing sensitivity and clearance: # id -Z staff_u:sysadm_r:sysadm_t:Unclassified-SystemHigh # newrole -l Secret-Secret # id -Z staff_u:sysadm_r:sysadm_t:Secret Running a program in a given role or level: # newrole -r sysadm_r -- -c "/path/to/app arg1 arg2..." # newrole -l Secret -- -c "/path/to/app arg1 arg2..." FILES
/etc/passwd - user account information /etc/shadow - encrypted passwords and age information /etc/selinux/<policy>/contexts/default_type - default types for roles /etc/selinux/<policy>/contexts/securetty_types - securetty types for level changes /etc/selinux/newrole_pam.conf - optional mapping of commands to separate pam service names SEE ALSO
runcon (1) AUTHORS
Anthony Colatrella Tim Fraser Steve Grubb <sgrubb@redhat.com> Darrel Goeddel <DGoeddel@trustedcs.com> Michael Thompson <mcthomps@us.ibm.com> Dan Walsh <dwalsh@redhat.com> Security Enhanced Linux October 2000 NEWROLE(1)

Check Out this Related Man Page

nx_server_selinux(8)				      nx_server SELinux Policy documentation				      nx_server_selinux(8)

NAME
nx_server_r - nx_server user role - Security Enhanced Linux Policy DESCRIPTION
SELinux supports Roles Based Access Control (RBAC), some Linux roles are login roles, while other roles need to be transition into. Note: Examples in this man page will use the staff_u SELinux user. 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. The default type for the nx_server_r role is nx_server_t. The newrole program to transition directly to this role. newrole -r nx_server_r -t nx_server_t sudo is the preferred method to do transition from one role to another. You setup sudo to transition to nx_server_r by adding a similar line to the /etc/sudoers file. USERNAME ALL=(ALL) ROLE=nx_server_r TYPE=nx_server_t COMMAND sudo will run COMMAND as staff_u:nx_server_r:nx_server_t:LEVEL When using a a non login role, you need to setup SELinux so that your SELinux user can reach nx_server_r role. Execute the following to see all of the assigned SELinux roles: semanage user -l You need to add nx_server_r to the staff_u user. You could setup the staff_u user to be able to use the nx_server_r role with a command like: $ semanage user -m -R 'staff_r system_r nx_server_r' staff_u BOOLEANS
SELinux policy is customizable based on least access required. nx_server policy is extremely flexible and has several booleans that allow you to manipulate the policy and run nx_server with the tightest access possible. If you want to deny any process from ptracing or debugging any other processes, you must turn on the deny_ptrace boolean. Enabled by default. setsebool -P deny_ptrace 1 If you want to allow all domains to use other domains file descriptors, you must turn on the domain_fd_use boolean. Enabled by default. setsebool -P domain_fd_use 1 If you want to allow all domains to have the kernel load modules, you must turn on the domain_kernel_load_modules boolean. Disabled by default. setsebool -P domain_kernel_load_modules 1 If you want to allow all domains to execute in fips_mode, you must turn on the fips_mode boolean. Enabled by default. setsebool -P fips_mode 1 If you want to enable reading of urandom for all domains, you must turn on the global_ssp boolean. Disabled by default. setsebool -P global_ssp 1 MANAGED FILES
The SELinux process type nx_server_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. nx_server_home_ssh_t /opt/NX/home/nx/.ssh(/.*)? /usr/NX/home/nx/.ssh(/.*)? /var/lib/nxserver/home/.ssh(/.*)? nx_server_tmp_t nx_server_var_lib_t /opt/NX/home(/.*)? /usr/NX/home(/.*)? /var/lib/nxserver(/.*)? nx_server_var_run_t /opt/NX/var(/.*)? ssh_home_t /var/lib/[^/]+/.ssh(/.*)? /root/.ssh(/.*)? /var/lib/one/.ssh(/.*)? /var/lib/pgsql/.ssh(/.*)? /var/lib/openshift/[^/]+/.ssh(/.*)? /var/lib/amanda/.ssh(/.*)? /var/lib/stickshift/[^/]+/.ssh(/.*)? /var/lib/gitolite/.ssh(/.*)? /var/lib/nocpulse/.ssh(/.*)? /var/lib/gitolite3/.ssh(/.*)? /var/lib/openshift/gear/[^/]+/.ssh(/.*)? /root/.shosts /home/[^/]*/.ssh(/.*)? /home/[^/]*/.ansible/cp/.* /home/[^/]*/.shosts COMMANDS
semanage fcontext can also be used to manipulate default file context mappings. semanage permissive can also be used to manipulate whether or not a process type is permissive. semanage module can also be used to enable/disable/install/remove policy modules. semanage boolean can also be used to manipulate the booleans system-config-selinux is a GUI tool available to customize SELinux policy settings. AUTHOR
This manual page was auto-generated using sepolicy manpage . SEE ALSO
selinux(8), nx_server(8), semanage(8), restorecon(8), chcon(1), sepolicy(8) , setsebool(8), nx_server_ssh_selinux(8), nx_server_ssh_selinux(8) mgrepl@redhat.com nx_server nx_server_selinux(8)
Man Page