Annotation of src/usr.bin/doas/doas.1, Revision 1.11
1.11 ! zhuk 1: .\" $OpenBSD: doas.1,v 1.10 2015/07/21 17:49:33 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.9 tedu 16: .Dd $Mdocdate: July 21 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.10 jmc 24: .Op Fl s
1.9 tedu 25: .Op Fl C Ar config
1.1 tedu 26: .Op Fl u Ar user
1.4 schwarze 27: .Ar command
1.1 tedu 28: .Op Ar args
29: .Sh DESCRIPTION
30: The
31: .Nm
32: utility executes the given command as another user.
1.11 ! zhuk 33: The
! 34: .Ar command
! 35: argument is mandatory unless
! 36: .Fl C
! 37: or
! 38: .Fl s
! 39: is specified.
1.1 tedu 40: .Pp
41: The options are as follows:
42: .Bl -tag -width tenletters
1.9 tedu 43: .It Fl C Ar config
44: Parse and check the configuration file
45: .Ar config ,
46: then exit.
1.11 ! zhuk 47: If
! 48: .Ar command
! 49: is supplied,
! 50: .Nm
! 51: will also perform command matching.
! 52: In the latter case
! 53: either
! 54: .Sq permit ,
! 55: .Sq permit nopass
! 56: or
! 57: .Sq deny
! 58: will be printed on standard output, depending on command
! 59: matching results.
1.9 tedu 60: No command is executed.
1.5 nicm 61: .It Fl s
62: Execute the shell from
63: .Ev SHELL
64: or
65: .Pa /etc/passwd .
1.1 tedu 66: .It Fl u Ar user
67: Execute the command as
68: .Ar user .
69: The default is root.
70: .El
71: .Sh EXIT STATUS
72: .Ex -std doas
1.3 tedu 73: It may fail for one of the following reasons:
1.1 tedu 74: .Pp
75: .Bl -bullet -compact
76: .It
1.7 jmc 77: The config file
1.6 espie 78: .Pa /etc/doas.conf
79: could not be parsed.
1.1 tedu 80: .It
1.2 tedu 81: The user attempted to run a command which is not permitted.
1.1 tedu 82: .It
1.2 tedu 83: The password was incorrect.
1.8 zhuk 84: .It
85: The actual program is absent or not executable.
1.1 tedu 86: .El
1.2 tedu 87: .Sh SEE ALSO
88: .Xr doas.conf 5
1.1 tedu 89: .Sh HISTORY
90: The
91: .Nm
92: command first appeared in
93: .Ox 5.8 .
94: .Sh AUTHORS
95: .An Ted Unangst Aq Mt tedu@openbsd.org