1RUNUSER(1) User Commands RUNUSER(1)
2
3
4
6 runuser - run a shell with substitute user and group IDs
7
9 runuser [OPTION]... [-] [USER [ARG]...]
10
12 Change the effective user id and group id to that of USER. Only ses‐
13 sion PAM hooks are run, and there is no password prompt. This command
14 is useful only when run as the root user. If run as a non-root user
15 without privilege to set user ID, the command will fail as the binary
16 is not setuid. As runuser doesn't run auth and account PAM hooks, it
17 runs with lower overhead than su.
18
19 -, -l, --login
20 make the shell a login shell, uses runuser-l PAM file instead of
21 default one, clears all envvars except for TERM, initializes
22 HOME, SHELL, USER, LOGNAME and PATH
23
24 -g --group=group
25 specify the primary group
26
27 -G --supp-group=group
28 specify a supplemental group
29
30 -c, --command=COMMAND
31 pass a single COMMAND to the shell with -c
32
33 --session-command=COMMAND
34 pass a single COMMAND to the shell with -c and do not create a
35 new session
36
37 -f, --fast
38 pass -f to the shell (for csh or tcsh)
39
40 -m, --preserve-environment
41 do not reset HOME, SHELL, USER, LOGNAME environment variables
42
43 -p same as -m
44
45 -s, --shell=SHELL
46 run SHELL if /etc/shells allows it
47
48 --help display this help and exit
49
50 --version
51 output version information and exit
52
53 A mere - implies -l. If USER not given, assume root.
54
56 Written by David MacKenzie, Dan Walsh.
57
59 Report runuser bugs to bug-coreutils@gnu.org
60 GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
61 General help using GNU software: <http://www.gnu.org/gethelp/>
62 Report runuser translation bugs to <http://translationpro‐
63 ject.org/team/>
64
66 Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU
67 GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
68 This is free software: you are free to change and redistribute it.
69 There is NO WARRANTY, to the extent permitted by law.
70
72 More detailed Texinfo documentation could be found by command
73
74 info coreutils 'su invocation'
75
76 since the command runuser is trimmed down version of command su.
77
78
79
80GNU coreutils 8.4 June 2018 RUNUSER(1)