]> git.armaanb.net Git - opendoas.git/blob - doas.1
whitespace;
[opendoas.git] / doas.1
1 .\" $OpenBSD: doas.1,v 1.6 2015/07/19 16:42:31 espie Exp $
2 .\"
3 .\"Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
4 .\"
5 .\"Permission to use, copy, modify, and distribute this software for any
6 .\"purpose with or without fee is hereby granted, provided that the above
7 .\"copyright notice and this permission notice appear in all copies.
8 .\"
9 .\"THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\"WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\"MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\"ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\"WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\"ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\"OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 .Dd $Mdocdate: July 19 2015 $
17 .Dt DOAS 1
18 .Os
19 .Sh NAME
20 .Nm doas
21 .Nd execute commands as another user
22 .Sh SYNOPSIS
23 .Nm doas
24 .Op Fl s
25 .Op Fl u Ar user
26 .Ar command
27 .Op Ar args
28 .Sh DESCRIPTION
29 The
30 .Nm
31 utility executes the given command as another user.
32 .Pp
33 The options are as follows:
34 .Bl -tag -width tenletters
35 .It Fl s
36 Execute the shell from
37 .Ev SHELL
38 or
39 .Pa /etc/passwd .
40 .It Fl u Ar user
41 Execute the command as
42 .Ar user .
43 The default is root.
44 .El
45 .Sh EXIT STATUS
46 .Ex -std doas
47 It may fail for one of the following reasons:
48 .Pp
49 .Bl -bullet -compact
50 .It
51 The config file
52 .Pa /etc/doas.conf
53 could not be parsed.
54 .It
55 The user attempted to run a command which is not permitted.
56 .It
57 The password was incorrect.
58 .El
59 .Sh SEE ALSO
60 .Xr doas.conf 5
61 .Sh HISTORY
62 The
63 .Nm
64 command first appeared in
65 .Ox 5.8 .
66 .Sh AUTHORS
67 .An Ted Unangst Aq Mt tedu@openbsd.org