sudo-rs icon indicating copy to clipboard operation
sudo-rs copied to clipboard

Authentication failure on Arch Linux with base sudo removed

Open gittoasted opened this issue 4 months ago • 5 comments
trafficstars

Describe the bug

Whenever a user tries to use sudo-rs on a Arch Linux machine with sudo removed, /etc/pam.d/sudo and /etc/sudoers are moved to their .pacsave counterparts but (due to the pacman package manager) but not copied rendering sudo-rs unusable at first.

To Reproduce

Steps to reproduce the behavior:

  1. Install sudo-rs
# pacman -S sudo-rs 
  1. Remove sudo without removing dependent packages
# pacman -Rdd sudo # Removes sudo
  1. Test sudo-rs
$ sudo-rs -ll
sudo-rs: invalid configuration: No such file or directory (os error 2)
  1. Correctly copy the .pacsave files from uninstalling sudo
# cp /etc/sudoers.pacsave /etc/sudoers
# cp /etc/pam.d/sudo.pacsave /etc/pam.d/sudo
  1. Test sudo-rs
$ sudo-rs -ll
sudo: Authentication failed, try again.
sudo: Authentication failed, try again.
sudo-rs: Maximum 3 incorrect authentication attempts

Expected behavior

sudo-rs should ship with the necessary files to be a proper "drop-in" replacement of sudo.

Environment (please complete the following information):

  • Linux distribution: Arch Linux
  • sudo-rs commit hash: b57be94 (Version 0.2.7)

Additional context

While removing sudo after installing sudo-rs which depends on some of sudo's files, sudo-rs does not ship with the required files for it to work out-of-the-box. The github README does state how to remediate the issues here: https://github.com/trifectatechfoundation/sudo-rs/#installing-our-pre-compiled-x86-64-binaries

gittoasted avatar Jul 07 '25 16:07 gittoasted