aboutsummaryrefslogtreecommitdiffstats
path: root/asroot.8
blob: 05ea6ce50e698c108666af10cb9c4b0f48d89f08 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
.TH ASROOT 8 asroot

.SH NAME
asroot - run a process as the root user

.SH SYNOPSIS
.B asroot
[-e]
.I command
.RI [ argument ]\ ...

.SH DESCRIPTION
The
.B asroot
utility asks for the user's password and runs the
specified
.I command
with sanitised and updated environment variables.
.PP
Only users in the
.B wheel
group are allowed to run the
.B asroot
utility, unless it is installed with non-standard permissions.

.SH OPTIONS
The
.B asroot
utility conforms to the Base Definitions volume of POSIX.1-2017,
.IR "Section 12.2" ,
.IR "Utility Syntax Guidelines" .
.PP
The following option is supported:
.TP
.B -e
Keep the environment variables as is. Neither
sanitise nor update them.

.SH OPERANDS
The following operands are supported:
.TP
.I command
The command that shall be run with as the root user.
This will be both the process image and the process's
zeroth command line argument.
.TP
.IR argument \ ...
Command line arguments for the command to run.

.SH STDIN
The
.B asroot
utility does not use the standard input, however the
.I command
it starts may.

.SH INPUT FILES
None.

.SH ENVIRONMENT VARIABLES
The following environment variables affects the execution of
.BR asroot :
.TP
.SH PATH
Default. See to the Base Definitions volume of POSIX.1-2017, Section 8.3, Other Environment Variables.

.SH ASYNCHRONOUS EVENTS
Default.

.SH STDOUT
The
.B asroot
utility does not use the standard output, however the
.I command
it starts may.

.SH STDERR
The standard error is used for diagnostic messages and the
password prompt. The
.I command
the
.B asroot
utility starts may also use the standard error.

.SH OUTPUT FILES
None.

.SH EXTENDED DESCRIPTION
None.

.SH EXIT STATUS
If the
.B asroot
utility fails it will exit with one of the following statuses:
.TP
125
A error occurred.
.TP
126
The process failed to change process image.
.TP
127
The specified command was not found.
.PP
If the
.B asroot
utility is successful, the exit status is defined by the
.I command
it starts.

.SH CONSEQUENCES OF ERRORS
Default.

.SH APPLICATION USAGE
None.

.SH EXAMPLES
None.

.SH RATIONALE
None.

.SH NOTES
The
.I PATH
environment variable will not be updated.
Updates environment variables are:
.IR HOME ,
.IR LOGNAME ,
.IR MAIL ,
.IR SHEEL ,
and
.IR USER .

.SH BUGS
None.

.SH FUTURE DIRECTIONS
None.

.SH SEE ALSO
.BR editasroot (8),
.BR key2root (8),
.BR sudo (8),
.BR doas (1),
.BR su (1)

.SH AUTHORS
Mattias Andrée
.RI < m@maandree.se >