From Fedora Project Wiki

Revision as of 09:50, 9 June 2021 by Sumantrom (talk | contribs) (Created page with "{{QA/Test_Case |description=This test case helps test working of doas command |setup= # Ensure the {{package|opendoas}} package is installed |actions= # In the console, execut...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This test case helps test working of doas command

Setup

  1. Ensure the opendoas package is installed

How to test

  1. In the console, execute doas <any_command_you_want_to_Execute> and it will by default execute as root
  2. In the console, executing doas -u non_admin_user dnf update

Expected Results

  1. The first command will execute as everything is being treated as if run by root privileges
  2. 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).