Debian Codegraph @

policycoreutils/newrole/newrole.1

raw
1 .TH NEWROLE "1" "October 2000" "Security Enhanced Linux" NSA
2 .SH NAME
3 newrole \- run a shell with a new SELinux role
4 .SH SYNOPSIS
5 .B newrole
6 [\fB-r\fR|\fB--role\fR]
7 \fIROLE\fR
8 [\fB-t\fR|\fB--type\fR]
9 \fITYPE\fR
10 [\fB-l\fR|\fB--level\fR]
11 [\fB-p\fR|\fB--preserve-environment\fR]
12 \fILEVEL\fR [-- [\fIARGS\fR]...]
13 .SH DESCRIPTION
14 .PP
15 Run a new shell in a new context. The new context is derived from the
16 old context in which
17 .B newrole
18 is originally executed. If the
19 .B -r
20 or
21 .B --role
22 option is specified, then the new context will have the role specified by
23 \fIROLE\fR.
24 If the
25 .B -t
26 or
27 .B --type
28 option is specified, then the new context will have the type (domain)
29 specified by
30 \fITYPE\fR.
31 If a role is specified, but no type is specified, the default type is derived
32 from the specified role. If the
33 .B -l
34 or
35 .B --level
36 option is specified, then the new context will have the sensitivity level
37 specified by
38 \fILEVEL\fR.
39 If
40 \fILEVEL\fR
41 is a range, the new context will have the sensitivity level and clearance
42 specified by that range. If the
43 .B -p
44 or
45 .B --preserve-environment
46 option is specified, the shell with the new SELinux context will preserve environment variables,
47 otherwise a new minimal environment is created.
48 .PP
49 Additional arguments
50 .I ARGS
51 may be provided after a -- option,
52 in which case they are supplied to the new shell.
53 In particular, an argument of \-\- \-c will cause the next argument to be
54 treated as a command by most command interpreters.
55 .PP
56 If a command argument is specified to newrole and the command name is found
57 in /etc/selinux/newrole_pam.conf, then the pam service name listed in that
58 file for the command will be used rather than the normal newrole pam
59 configuration. This allows for per-command pam configuration when
60 invoked via newrole, e.g. to skip the interactive re-authentication phase.
61 .PP
62 The new shell will be the shell specified in the user's entry in the
63 .I /etc/passwd
64 file.
65 .PP
66 The
67 .B -V
68 or
69 .B --version
70 shows the current version of newrole
71 .PP
72 .SH EXAMPLE
73 .br
74 Changing role:
75 # id \-Z
76 staff_u:staff_r:staff_t:SystemLow-SystemHigh
77 # newrole \-r sysadm_r
78 # id \-Z
79 staff_u:sysadm_r:sysadm_t:SystemLow-SystemHigh
80
81 Changing sensitivity only:
82 # id \-Z
83 staff_u:sysadm_r:sysadm_t:Unclassified-SystemHigh
84 # newrole \-l Secret
85 # id \-Z
86 staff_u:sysadm_r:sysadm_t:Secret-SystemHigh
87
88 .PP
89 Changing sensitivity and clearance:
90 # id \-Z
91 staff_u:sysadm_r:sysadm_t:Unclassified-SystemHigh
92 # newrole \-l Secret-Secret
93 # id \-Z
94 staff_u:sysadm_r:sysadm_t:Secret
95
96 .PP
97 Running a program in a given role or level:
98 # newrole \-r sysadm_r \-\- \-c "/path/to/app arg1 arg2..."
99 # newrole \-l Secret \-\- \-c "/path/to/app arg1 arg2..."
100
101 .SH FILES
102 /etc/passwd - user account information
103 .br
104 /etc/shadow - encrypted passwords and age information
105 .br
106 /etc/selinux/<policy>/contexts/default_type - default types for roles
107 .br
108 /etc/selinux/<policy>/contexts/securetty_types - securetty types for level changes
109 .br
110 /etc/selinux/newrole_pam.conf - optional mapping of commands to separate pam service names
111 .br
112 .SH SEE ALSO
113 .BR runcon (1)
114 .SH AUTHORS
115 .nf
116 Anthony Colatrella
117 Tim Fraser
118 Steve Grubb <[email protected]>
119 Darrel Goeddel <[email protected]>
120 Michael Thompson <[email protected]>
121 Dan Walsh <[email protected]>