1 .\" $OpenBSD: doas.1,v 1.13 2015/07/26 23:00:15 tedu Exp $
3 .\"Copyright (c) 2015 Ted Unangst <tedu@openbsd.org>
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.
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 26 2015 $
21 .Nd execute commands as another user
32 utility executes the given command as another user.
35 argument is mandatory unless
42 The user will be required to authenticate by entering their password,
43 unless configured otherwise.
45 By default, a new environment is created.
55 are set to values appropriate for the target user.
57 is set to the name of the user executing
63 are inherited from the current environment.
64 This behavior may be modified by the config file.
65 The working directory is not changed.
67 The options are as follows:
68 .Bl -tag -width tenletters
70 Parse and check the configuration file
77 will also perform command matching.
84 will be printed on standard output, depending on command
86 No command is executed.
88 Clear any persisted authorizations from previous invocations,
89 then immediately exit.
90 No command is executed.
92 Non interactive mode, fail if the matching rule doesn't have the
96 Execute the shell from
101 Execute the command as
107 It may fail for one of the following reasons:
115 The user attempted to run a command which is not permitted.
117 The password was incorrect.
119 The specified command was not found or is not executable.
127 command first appeared in
130 .An Ted Unangst Aq Mt tedu@openbsd.org