Skip to content

Commit 9361aae

Browse files
authored
Actualize README.md (#1276)
- Adds a section on FreeBSD - Adds a section on upcoming Ubuntu - I've weakened our advice on the package managers.
1 parent 90f10cc commit 9361aae

File tree

1 file changed

+57
-18
lines changed

1 file changed

+57
-18
lines changed

README.md

Lines changed: 57 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,70 @@ Sudo-rs currently is targeted for FreeBSD and Linux-based operating systems only
1717

1818
## Installing sudo-rs
1919

20-
The recommended way to start using `sudo-rs` is via the package manager of your Linux distribution.
20+
You can install sudo-rs using the package manager of your Linux distribution. Many Linux distributions will also keep
21+
original sudo installed and so offer sudo-rs using modified command names. You can work around that by creating e.g. an `alias`, but that will
22+
only change your own invocations of `sudo` to sudo-rs and not affect other programs and scripts that use `sudo`.
2123

22-
### Debian/Ubuntu
23-
If you are running Debian 13 (trixie) or later, or Ubuntu 24.04 (Noble Numbat) or later, you can use:
24+
To avoid that and/or to get the latest version, you can use our prepackaged binaries (see below).
25+
26+
### Ubuntu 25.10 (Questing Quokka)
27+
28+
sudo-rs is installed and enabled by default; you can control which sudo version is being used by running
2429
```sh
25-
apt-get install sudo-rs
30+
update-alternatives --config sudo
31+
```
32+
The sudo-rs package is based on v0.2.8 with additional bug fixes that will be part of v0.2.9.
33+
34+
### Arch Linux
35+
36+
sudo-rs can be installed from the distribution repositories:
37+
```sh
38+
pacman -S sudo-rs
2639
```
27-
This will offer the functionality using the commands `su-rs` and `sudo-rs`. If you want to invoke sudo-rs
28-
via the usual commands `sudo` and `su` instead, prepend `/usr/lib/cargo/bin` to your current `$PATH` variable.
40+
This will offer the functionality using the commands `sudo-rs`, `sudoedit-rs`, `visudo-rs` and `su-rs` to avoid conflicts.
41+
42+
The sudo-rs package on Arch Linux is typically up-to-date.
2943

3044
### Fedora
3145

32-
If you are running Fedora 38 or later, you can use:
46+
If you are running Fedora 41 or later, you can use:
3347
```sh
3448
dnf install sudo-rs
3549
```
36-
This will offer the functionality using the commands `su-rs` and `sudo-rs`.
50+
This will offer the functionality using the commands `sudo-rs`, `visudo-rs` and `su-rs` to avoid conflicts.
3751

38-
### Arch Linux
52+
The version packaged is based on release 0.2.6 from May 2025 which is missing `sudoedit`, `NOEXEC:`, and a few other improvements.
3953

40-
On Arch Linux sudo-rs can be installed from the distribution repositories:
54+
### Debian
55+
If you are running Debian 13 (trixie) or later you can use:
4156
```sh
42-
pacman -S sudo-rs
57+
apt-get install sudo-rs
58+
```
59+
This will offer the functionality using the commands `sudo-rs`, `visudo-rs`. If you want to invoke sudo-rs
60+
via the usual commands `sudo` and `visudo` instead, prepend `/usr/lib/cargo/bin` to your current `$PATH` variable.
61+
62+
Due to a misconfiguration in this package, `su-rs` cannot be used because it does not have the setuid flag set.
63+
64+
The sudo-rs version packaged in Debian 13 (trixie) is based on release 0.2.5 from April 2025 which is missing `sudoedit`, `NOEXEC:`,
65+
and several other improvements, but is up-to-date with respect to security patches. Debian unstable (sid) may have a newer version.
66+
67+
### FreeBSD
68+
69+
We are maintaining the FreeBSD port of sudo-rs ourselves, which is available in the ports tree. Sudo-rs is available in two flavours:
4370
```
44-
This will offer the functionality using the commands `su-rs` and `sudo-rs`.
71+
pkg install sudo-rs
72+
```
73+
To get sudo-rs using the commands `sudo`, `visudo` and `sudoedit`. This conflicts with the `security/sudo` package and so you cannot have both
74+
installed at the same time.
75+
76+
Alternatively,
77+
```
78+
pkg install sudo-rs-coexist
79+
```
80+
Installs the commands as `sudo-rs`, `visudo-rs`' and `sudoedit-rs` and does not conflict with the `security/sudo` package.
81+
82+
To run these commands, the `pkg` utility needs to be using the `2025Q4` quarterly version (or later) of the ports tree. To use the
83+
absolute latest version, you can [switch from quarterly to `latest`](https://wiki.freebsd.org/Ports/QuarterlyBranch#How_to_switch_from_quarterly_to_latest).
4584

4685
### NixOS
4786

@@ -56,21 +95,21 @@ This will replace the usual `sudo` and `sudoedit` commands.
5695
### Installing our pre-compiled x86-64 binaries
5796

5897
You can also switch to sudo-rs manually by using our pre-compiled tarballs.
59-
We currently only offer these for x86-64 systems.
98+
We currently only offer these for x86-64 Linux systems.
6099

61-
We recommend installing sudo-rs and su-rs in your `/usr/local` hierarchy so it can co-exist with
62-
your existing sudo installation. You can achieve this using the commands:
100+
We recommend installing sudo-rs and su-rs in your `/usr/local` hierarchy so it does not affect the integrity of the package
101+
manager of your Linux distribution. You can achieve this using the commands:
63102
```sh
64103
sudo tar -C /usr/local -xvf sudo-0.2.8.tar.gz
65104
```
66105
and for su-rs:
67106
```sh
68107
sudo tar -C /usr/local -xvf su-0.2.8.tar.gz
69108
```
70-
This will install sudo-rs and su-rs in `/usr/local/bin` using the usual commands `sudo` and `su`; it
71-
will also install our version of `visudo` in that location.
109+
This will install sudo-rs and su-rs in `/usr/local/bin` using the usual commands `sudo`, `visudo`, `sudoedit` and `su`. Please double check
110+
that in your default `PATH`, the folders `/usr/local/bin` and `/usr/local/sbin` have priority over `/usr/bin` and `/usr/sbin`.
72111

73-
Of course, if you **don't** have Todd Miller's `sudo` installed, you also have to make sure that:
112+
If you **don't** have Todd Miller's `sudo` installed, you also have to make sure that:
74113

75114
* You manually create a `/etc/sudoers` or `/etc/sudoers-rs` file, this could be as simple as:
76115

0 commit comments

Comments
 (0)