GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DOAS(1) FreeBSD General Commands Manual DOAS(1)

doas
execute commands as another user

doas [-nSs] [-a style] [-C config] [-u user] [--] command [args]

The doas utility executes the given command as another user. The command argument is mandatory unless -C, -S, or -s is specified.

The options are as follows:

style
Use the specified authentication style when validating the user, as allowed by /etc/login.conf. A list of doas-specific authentication methods may be configured by adding an ‘auth-doas’ entry in login.conf(5).
config
Parse and check the configuration file config, then exit. If command is supplied, doas will also perform command matching. In the latter case either ‘permit’, ‘permit nopass’ or ‘deny’ will be printed on standard output, depending on command matching results. No command is executed.
Non interactive mode, fail if doas would prompt for password.
Same as -s but simulates a full login. Please note this may result in doas applying resource limits to the user based on the target user's login class. However, environment variables applicable to the target user are still stripped, unless KEEPENV is specified.
Execute the shell from SHELL or /etc/passwd.
user
Execute the command as user. The default is root.
Any dashes after a combined double dash (--) will be interpreted as part of the command to be run or its parameters. Not an argument passed to doas itself.

The doas utility exits 0 on success, and >0 if an error occurs. It may fail for one of the following reasons:

  • The config file /usr/local/etc/doas.conf could not be parsed.
  • The user attempted to run a command which is not permitted.
  • The password was incorrect.
  • The specified command was not found or is not executable.

su(1), doas.conf(5)

The doas command first appeared in OpenBSD 5.8.

Ted Unangst <tedu@openbsd.org>
June 11, 2016 FreeBSD 13.1-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.