summaryrefslogtreecommitdiff
path: root/usr.bin/doas/doas.1
blob: cc65cf0a91f28755bd024ecf0dc09cf8a6bf129a (plain)
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
.\" $OpenBSD: doas.1,v 1.2 2015/07/17 17:11:18 tedu Exp $
.\"
.\"Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
.\"
.\"Permission to use, copy, modify, and distribute this software for any
.\"purpose with or without fee is hereby granted, provided that the above
.\"copyright notice and this permission notice appear in all copies.
.\"
.\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.Dd $Mdocdate: July 17 2015 $
.Dt DOAS 1
.Os
.Sh NAME
.Nm doas
.Nd execute commands as another user
.Sh SYNOPSIS
.Nm doas
.Op Fl u Ar user
command
.Op Ar args
.Sh DESCRIPTION
The
.Nm
utility executes the given command as another user.
.Pp
The options are as follows:
.Bl -tag -width tenletters
.It Fl u Ar user
Execute the command as
.Ar user .
The default is root.
.El
.Sh EXIT STATUS
.Ex -std doas
It may fail because of one of the following reasons:
.Pp
.Bl -bullet -compact
.It
The config file could not be parsed.
.It
The user attempted to run a command which is not permitted.
.It
The password was incorrect.
.El
.Sh SEE ALSO
.Xr doas.conf 5
.Sh HISTORY
The
.Nm
command first appeared in
.Ox 5.8 .
.Sh AUTHORS
.An Ted Unangst Aq Mt tedu@openbsd.org