]> git.armaanb.net Git - opendoas.git/blob - doas.1
cases should line up with switch, from Dimitris Papastamos
[opendoas.git] / doas.1
1 .\" $OpenBSD: doas.1,v 1.8 2015/07/21 11:04:06 zhuk 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 21 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 C Ar config
25 .Op Fl s
26 .Op Fl u Ar user
27 .Ar command
28 .Op Ar args
29 .Sh DESCRIPTION
30 The
31 .Nm
32 utility executes the given command as another user.
33 .Pp
34 The options are as follows:
35 .Bl -tag -width tenletters
36 .It Fl C Ar config
37 Parse and check the configuration file
38 .Ar config ,
39 then exit.
40 No command is executed.
41 .It Fl s
42 Execute the shell from
43 .Ev SHELL
44 or
45 .Pa /etc/passwd .
46 .It Fl u Ar user
47 Execute the command as
48 .Ar user .
49 The default is root.
50 .El
51 .Sh EXIT STATUS
52 .Ex -std doas
53 It may fail for one of the following reasons:
54 .Pp
55 .Bl -bullet -compact
56 .It
57 The config file
58 .Pa /etc/doas.conf
59 could not be parsed.
60 .It
61 The user attempted to run a command which is not permitted.
62 .It
63 The password was incorrect.
64 .It
65 The actual program is absent or not executable.
66 .El
67 .Sh SEE ALSO
68 .Xr doas.conf 5
69 .Sh HISTORY
70 The
71 .Nm
72 command first appeared in
73 .Ox 5.8 .
74 .Sh AUTHORS
75 .An Ted Unangst Aq Mt tedu@openbsd.org