Questions tagged [doas]
Use this tag with questions regarding the use or configuration of the doas utility, used for executing a command or shell as another user.
12
questions
0
votes
1
answer
43
views
How to run a command in the background with 'doas'?
I want to run a command in the background as root. And I have a problem with doas command.
With sudo, I can use sudo --background <command>. It will ask for password, then runs in the background....
2
votes
1
answer
149
views
Why doesn't this script succeed from crontab as it does when manually run?
This script works when executed with doas ./backup_cron_root.sh
#!/usr/bin/bash
/usr/bin/crontab -l> "/tmp/cron.$(whoami).$(hostname)" && /bin/date>>"/tmp/cron.$(...
1
vote
0
answers
37
views
Why doesn't doas wget -qO- archive.tar.gz|doas tar -xz work as with sudo?
sudo wget -qO- https://go.dev/dl/go1.20.1.linux-amd64.tar.gz|sudo tar -xz works fine.
doas wget -qO- https://go.dev/dl/go1.20.1.linux-amd64.tar.gz|doas tar -xz does not work. I get no input, it just ...
2
votes
1
answer
92
views
How to install packages in chroot when chroot is launched with doas?
On OpenBSD 7.2 stable, I've setup my chroot using this script:
#!/bin/ksh
dir="/jails/$1"
mkdir -p "$dir"
tar -C "$dir" -xzf /usr/src/base/base72.tgz
tar -C "$dir&...
0
votes
0
answers
115
views
How to make doas ask for root password
I want to configure doas so that it asks for root password, but not for normal user password. How do I do that?
0
votes
0
answers
388
views
doas doesn't run a /usr/sbin binary
I'm using Debian/GNU/Linux Unstable,
and I was trying doas for the first time today, with the following simple config file:
$ doas cat /etc/doas.conf
permit persist alx as root
While it worked for ...
-1
votes
1
answer
367
views
Using "doas" with root password instead of user password
From my limited understanding, the doas utility allows you to run any command as root but, by default, requires you to enter your own password instead of the root user's password.
How do I make it ...
-3
votes
2
answers
92
views
Is there any way to prevent someone from running a shell as root?
This is a question I've pondered for a long time and thought was impossible.
Is it possible to prevent administrators of a machine from bypassing the audit capabilities of sudo or doas? For instance, ...
0
votes
1
answer
393
views
Changing "doas" prompt
How may I change my doas prompt? For example, to change sudo prompt you just run
export SUDO_PROMPT="Prompt: "
Is there an equivalent for doas?
1
vote
1
answer
3k
views
shutdown without password using doas
I want to be able to shutdown (or restart) my system without having to enter my password. My /etc/doas.conf looks like this and my user is in the wheel group
permit nopass :wheel as root cmd /sbin/...
2
votes
1
answer
5k
views
"doas" allow user to run command with other user and set environment variables
There are two normal users on my OpenBSD machine ("user" and "TESTUSER") and I have this doas config:
# cat /etc/doas.conf ...
2
votes
2
answers
1k
views
Why would root need to run unrestricted commands as itself via doas?
I've just come across doas, and while reading the man page for its configuration I found this example:
The following example permits users in group wsrc to build ports; wheel to execute commands as ...