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
+36-10Lines changed: 36 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,36 +26,45 @@ To avoid that and/or to get the latest version, you can use our prepackaged bina
26
26
### Ubuntu 25.10 (Questing Quokka)
27
27
28
28
sudo-rs is installed and enabled by default; you can control which sudo version is being used by running
29
+
29
30
```sh
30
31
update-alternatives --config sudo
31
32
```
33
+
32
34
The sudo-rs package is based on v0.2.8 with additional bug fixes that will be part of v0.2.9.
33
35
34
36
### Arch Linux
35
37
36
38
sudo-rs can be installed from the distribution repositories:
39
+
37
40
```sh
38
41
pacman -S sudo-rs
39
42
```
43
+
40
44
This will offer the functionality using the commands `sudo-rs`, `sudoedit-rs`, `visudo-rs` and `su-rs` to avoid conflicts.
41
45
42
46
The sudo-rs package on Arch Linux is typically up-to-date.
43
47
44
48
### Fedora
45
49
46
50
On Fedora you can use:
51
+
47
52
```sh
48
53
dnf install sudo-rs
49
54
```
55
+
50
56
This will offer the functionality using the commands `sudo-rs`, `visudo-rs` and `su-rs` to avoid conflicts.
51
57
52
58
The version packaged in Fedora is usually the latest.
53
59
54
60
### Debian
61
+
55
62
If you are running Debian 13 (trixie) or later you can use:
63
+
56
64
```sh
57
65
apt-get install sudo-rs
58
66
```
67
+
59
68
This will offer the functionality using the commands `sudo-rs`, `visudo-rs`. If you want to invoke sudo-rs
60
69
via the usual commands `sudo` and `visudo` instead, prepend `/usr/lib/cargo/bin` to your current `$PATH` variable.
61
70
@@ -68,16 +77,20 @@ Debian unstable (sid) may have a newer version.
68
77
### FreeBSD
69
78
70
79
We are maintaining the FreeBSD port of sudo-rs ourselves, which is available in the ports tree. Sudo-rs is available in two flavours:
71
-
```
80
+
81
+
```sh
72
82
pkg install sudo-rs
73
83
```
84
+
74
85
To get sudo-rs using the commands `sudo`, `visudo` and `sudoedit`. This conflicts with the `security/sudo` package and so you cannot have both
75
86
installed at the same time.
76
87
77
88
Alternatively,
78
-
```
89
+
90
+
```sh
79
91
pkg install sudo-rs-coexist
80
92
```
93
+
81
94
Installs the commands as `sudo-rs`, `visudo-rs`' and `sudoedit-rs` and does not conflict with the `security/sudo` package.
82
95
83
96
To run these commands, the `pkg` utility needs to be using the `2025Q4` quarterly version (or later) of the ports tree. To use the
@@ -96,6 +109,7 @@ This will replace the usual `sudo` and `sudoedit` commands.
96
109
### Alpine Linux
97
110
98
111
On Alpine Linux, sudo-rs is in the *community* repository, and can be installed as:
112
+
99
113
```sh
100
114
apk add sudo-rs
101
115
```
@@ -110,13 +124,17 @@ We currently only offer these for x86-64 Linux systems.
110
124
111
125
We recommend installing sudo-rs and su-rs in your `/usr/local` hierarchy so it does not affect the integrity of the package
112
126
manager of your Linux distribution. You can achieve this using the commands:
127
+
113
128
```sh
114
129
sudo tar -C /usr/local -xvf sudo-0.2.13.tar.gz
115
130
```
131
+
116
132
and for su-rs:
133
+
117
134
```sh
118
135
sudo tar -C /usr/local -xvf su-0.2.13.tar.gz
119
136
```
137
+
120
138
This will install sudo-rs and su-rs in `/usr/local/bin` using the usual commands `sudo`, `visudo`, `sudoedit` and `su`. Please double check
121
139
that in your default `PATH`, the folders `/usr/local/bin` and `/usr/local/sbin` have priority over `/usr/bin` and `/usr/sbin`.
122
140
@@ -155,17 +173,20 @@ install translated messages, you also need gettext tools for `msgfmt` (`gettext`
155
173
on Debian and Ubuntu).
156
174
157
175
On Ubuntu or Debian-based systems, use the following command to install the PAM development library:
158
-
```
176
+
177
+
```sh
159
178
sudo apt-get install libpam0g-dev
160
179
```
161
180
162
181
On Fedora, CentOS and other Red Hat-based systems, you can use the following command:
163
-
```
182
+
183
+
```sh
164
184
sudo yum install pam-devel
165
185
```
166
186
167
187
With dependencies installed, building sudo-rs is a simple matter of:
168
-
```
188
+
189
+
```sh
169
190
cargo build --release
170
191
```
171
192
@@ -179,20 +200,25 @@ suggestions in the previous section.
179
200
### Feature flags
180
201
181
202
#### --features pam-login
203
+
182
204
By default, sudo-rs will use the PAM service name `sudo`. On Debian and Fedora
183
205
systems, it is customary that the name `sudo-i` is used when the `-i / --login`
184
206
command line option is used. To get this behaviour, enable the `pam-login`
185
207
feature when building:
186
-
```
208
+
209
+
```sh
187
210
cargo build --release --features pam-login
188
211
```
212
+
189
213
This feature is enabled on our pre-supplied binaries.
190
214
191
215
#### --features apparmor
216
+
192
217
sudo-rs has support for selecting AppArmor profile on Linux distributions that
193
218
support AppArmor such as Debian and Ubuntu. To enable this feature, build sudo-rs
194
219
with apparmor support enabled:
195
-
```
220
+
221
+
```sh
196
222
cargo build --release --features apparmor
197
223
```
198
224
@@ -203,13 +229,13 @@ This feature is disabled on our pre-supplied binaries.
203
229
sudo-rs has support for translated user-facing messages. To enable this feature,
204
230
build sudo-rs with gettext support enabled:
205
231
206
-
```
232
+
```sh
207
233
cargo build --release --features gettext
208
234
```
209
235
210
236
You can install the translation files from `po/*.po` using:
211
237
212
-
```
238
+
```sh
213
239
sudo make install-mo
214
240
```
215
241
@@ -301,4 +327,4 @@ Sudo-rs is an independent implementation, but it incorporates documentation and
301
327
302
328
An independent security audit of sudo-rs was made possible by the [NLNet Foundation](https://nlnet.nl/), who also [sponsored](https://nlnet.nl/project/sudo-rs/) work on increased compatibility with the original sudo and the FreeBSD port.
303
329
304
-
The sudo-rs project would not have existed without the support of its sponsors, a full overview is maintained at https://trifectatech.org/initiatives/privilege-boundary/
330
+
The sudo-rs project would not have existed without the support of its sponsors, a full overview is maintained at <https://trifectatech.org/initiatives/privilege-boundary/>
0 commit comments