You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+57-18Lines changed: 57 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,31 +17,70 @@ Sudo-rs currently is targeted for FreeBSD and Linux-based operating systems only
17
17
18
18
## Installing sudo-rs
19
19
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`.
21
23
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
24
29
```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
26
39
```
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.
29
43
30
44
### Fedora
31
45
32
-
If you are running Fedora 38 or later, you can use:
46
+
If you are running Fedora 41 or later, you can use:
33
47
```sh
34
48
dnf install sudo-rs
35
49
```
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.
37
51
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.
39
53
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:
41
56
```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:
43
70
```
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).
45
84
46
85
### NixOS
47
86
@@ -56,21 +95,21 @@ This will replace the usual `sudo` and `sudoedit` commands.
56
95
### Installing our pre-compiled x86-64 binaries
57
96
58
97
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.
60
99
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:
63
102
```sh
64
103
sudo tar -C /usr/local -xvf sudo-0.2.8.tar.gz
65
104
```
66
105
and for su-rs:
67
106
```sh
68
107
sudo tar -C /usr/local -xvf su-0.2.8.tar.gz
69
108
```
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`.
72
111
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:
74
113
75
114
* You manually create a `/etc/sudoers` or `/etc/sudoers-rs` file, this could be as simple as:
0 commit comments