Annotation of src/usr.bin/doas/doas.1, Revision 1.8
1.8 ! zhuk 1: .\" $OpenBSD: doas.1,v 1.7 2015/07/19 17:00:22 jmc Exp $
1.1 tedu 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.
1.7 jmc 16: .Dd $Mdocdate: July 19 2015 $
1.1 tedu 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
1.5 nicm 24: .Op Fl s
1.1 tedu 25: .Op Fl u Ar user
1.4 schwarze 26: .Ar command
1.1 tedu 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
1.5 nicm 35: .It Fl s
36: Execute the shell from
37: .Ev SHELL
38: or
39: .Pa /etc/passwd .
1.1 tedu 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
1.3 tedu 47: It may fail for one of the following reasons:
1.1 tedu 48: .Pp
49: .Bl -bullet -compact
50: .It
1.7 jmc 51: The config file
1.6 espie 52: .Pa /etc/doas.conf
53: could not be parsed.
1.1 tedu 54: .It
1.2 tedu 55: The user attempted to run a command which is not permitted.
1.1 tedu 56: .It
1.2 tedu 57: The password was incorrect.
1.8 ! zhuk 58: .It
! 59: The actual program is absent or not executable.
1.1 tedu 60: .El
1.2 tedu 61: .Sh SEE ALSO
62: .Xr doas.conf 5
1.1 tedu 63: .Sh HISTORY
64: The
65: .Nm
66: command first appeared in
67: .Ox 5.8 .
68: .Sh AUTHORS
69: .An Ted Unangst Aq Mt tedu@openbsd.org