Annotation of src/usr.bin/doas/doas.1, Revision 1.5
1.5 ! nicm 1: .\" $OpenBSD: doas.1,v 1.4 2015/07/17 20:50:31 schwarze 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.3 tedu 16: .Dd $Mdocdate: July 17 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
51: The config file could not be parsed.
52: .It
1.2 tedu 53: The user attempted to run a command which is not permitted.
1.1 tedu 54: .It
1.2 tedu 55: The password was incorrect.
1.1 tedu 56: .El
1.2 tedu 57: .Sh SEE ALSO
58: .Xr doas.conf 5
1.1 tedu 59: .Sh HISTORY
60: The
61: .Nm
62: command first appeared in
63: .Ox 5.8 .
64: .Sh AUTHORS
65: .An Ted Unangst Aq Mt tedu@openbsd.org