Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DOAS(1)			    General Commands Manual		       DOAS(1)

NAME
       doas -- execute commands	as another user

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

DESCRIPTION
       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:

       -a style	   Use the specified authentication style when validating  the
		   user,  as  allowed by /etc/login.conf.  A list of doas-spe-
		   cific authentication	methods	may be configured by adding an
		   `auth-doas' entry in	login.conf(5).

       -C 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, de-
		   pending on command matching results.	 No  command  is  exe-
		   cuted.

       -n	   Non	interactive  mode, fail	if doas	would prompt for pass-
		   word.

       -S	   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.

       -s	   Execute the shell from SHELL	or /etc/passwd.

       -u user	   Execute the command as user.	 The default is	root.

       --	   Any dashes after a combined double dash (--)	will be	inter-
		   preted as part of the command to be run or its  parameters.
		   Not an argument passed to doas itself.

EXIT STATUS
       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.

SEE ALSO
       su(1), doas.conf(5)

HISTORY
       The doas	command	first appeared in OpenBSD 5.8.

AUTHORS
       Ted Unangst <tedu@openbsd.org>

FreeBSD	13.1			 June 11, 2016			       DOAS(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=doas&sektion=1&manpath=FreeBSD+13.1-RELEASE+and+Ports>

home | help