Skip to content

Commit a4f109e

Browse files
pranlawatedmmqzManagor
authored andcommitted
newrole: add page (tldr-pages#18457)
Co-authored-by: Dylan <[email protected]> Co-authored-by: Managor <[email protected]>
1 parent 81f0897 commit a4f109e

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

pages/linux/newrole.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# newrole
2+
3+
> Run a new shell with a different SELinux role.
4+
> Allows users to switch to a different SELinux security context.
5+
> See also: `runcon`, `semanage-user`.
6+
> More information: <https://manned.org/newrole>.
7+
8+
- Start a new shell with a specific SELinux role:
9+
10+
`newrole {{[-r|--role]}} {{role_name}}`
11+
12+
- Start a new shell with a specific SELinux type:
13+
14+
`newrole {{[-t|--type]}} {{type_name}}`
15+
16+
- Start a new shell with a specific SELinux level (format: `s0-s0:c0.c1023` where levels range from `s0` to `s15`, `-` indicates level range, categories start with `c`, `:` separates level from categories, `.` indicates category range):
17+
18+
`newrole {{[-l|--level]}} {{s0-s0:c0.c1023}}`
19+
20+
- Display the current SELinux context:
21+
22+
`id {{[-Z|--context]}}`
23+
24+
- Start a new shell with both role and type:
25+
26+
`newrole {{[-r|--role]}} {{role_name}} {{[-t|--type]}} {{type_name}}`

0 commit comments

Comments
 (0)