From Fedora Project Wiki
Description
This test case helps test working of doas command
Setup
- Ensure the
opendoas
package is installed
How to test
- In the console, execute
doas <any_command_you_want_to_Execute>
and it will by default execute as root - In the console, executing
doas -u non_admin_user dnf update
Expected Results
- The first command will execute as everything is being treated as if run by root privileges
- The second command fails, since the dnf update requires root or sudo privileges. The err thrown out reads
[sumantromukherjee@fedora ~]$ doas -u sumantromukherjee dnf update doas (sumantromukherjee@fedora) password: Error: This command has to be run with superuser privileges (under the root user on most systems).