trifectatechfoundation / trifectatechfoundation/sudo-rs

Authentication failure on Arch Linux with base sudo removed

Open
#1,182 9 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

external-packaging help wanted
Dominant language
Rust
Stars
4.5k
Forks
179
Avg merge
16h 45m
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the Arch Linux reproduction steps and the README's pre-compiled binary installation guidance, then inspect how /etc/sudoers and /etc/pam.d/sudo are provided when sudo is removed. Reproduce the pacman commands and verify that sudo-rs works without manually copying the .pacsave files.

Written by the indexing model from the issue text.

Assessment

Tech stack
arch-linux, rust
Domain
authentication, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.