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
+55-9Lines changed: 55 additions & 9 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
@@ -100,13 +113,17 @@ We currently only offer these for x86-64 Linux systems.
100
113
101
114
We recommend installing sudo-rs and su-rs in your `/usr/local` hierarchy so it does not affect the integrity of the package
102
115
manager of your Linux distribution. You can achieve this using the commands:
116
+
103
117
```sh
104
118
sudo tar -C /usr/local -xvf sudo-0.2.13.tar.gz
105
119
```
120
+
106
121
and for su-rs:
122
+
107
123
```sh
108
124
sudo tar -C /usr/local -xvf su-0.2.13.tar.gz
109
125
```
126
+
110
127
This will install sudo-rs and su-rs in `/usr/local/bin` using the usual commands `sudo`, `visudo`, `sudoedit` and `su`. Please double check
111
128
that in your default `PATH`, the folders `/usr/local/bin` and `/usr/local/sbin` have priority over `/usr/bin` and `/usr/sbin`.
112
129
@@ -140,20 +157,25 @@ If you **don't** have Todd Miller's `sudo` installed, you also have to make sure
140
157
Sudo-rs is written in Rust. The minimum required Rust version is 1.85. If your
141
158
Linux distribution does not package that version (or a later one), you can always
142
159
install the most recent version through [rustup]. You also need the C development
143
-
files for PAM (`libpam0g-dev` on Debian, `pam-devel` on Fedora).
160
+
files for PAM (`libpam0g-dev` on Debian, `pam-devel` on Fedora). If you want to
161
+
install translated messages, you also need gettext tools for `msgfmt` (`gettext`
162
+
on Debian and Ubuntu).
144
163
145
164
On Ubuntu or Debian-based systems, use the following command to install the PAM development library:
146
-
```
165
+
166
+
```sh
147
167
sudo apt-get install libpam0g-dev
148
168
```
149
169
150
170
On Fedora, CentOS and other Red Hat-based systems, you can use the following command:
151
-
```
171
+
172
+
```sh
152
173
sudo yum install pam-devel
153
174
```
154
175
155
176
With dependencies installed, building sudo-rs is a simple matter of:
156
-
```
177
+
178
+
```sh
157
179
cargo build --release
158
180
```
159
181
@@ -167,25 +189,49 @@ suggestions in the previous section.
167
189
### Feature flags
168
190
169
191
#### --features pam-login
192
+
170
193
By default, sudo-rs will use the PAM service name `sudo`. On Debian and Fedora
171
194
systems, it is customary that the name `sudo-i` is used when the `-i / --login`
172
195
command line option is used. To get this behaviour, enable the `pam-login`
173
196
feature when building:
174
-
```
197
+
198
+
```sh
175
199
cargo build --release --features pam-login
176
200
```
201
+
177
202
This feature is enabled on our pre-supplied binaries.
178
203
179
204
#### --features apparmor
205
+
180
206
sudo-rs has support for selecting AppArmor profile on Linux distributions that
181
207
support AppArmor such as Debian and Ubuntu. To enable this feature, build sudo-rs
182
208
with apparmor support enabled:
183
-
```
209
+
210
+
```sh
184
211
cargo build --release --features apparmor
185
212
```
186
213
187
214
This feature is disabled on our pre-supplied binaries.
188
215
216
+
#### --features gettext
217
+
218
+
sudo-rs has support for translated user-facing messages. To enable this feature,
219
+
build sudo-rs with gettext support enabled:
220
+
221
+
```sh
222
+
cargo build --release --features gettext
223
+
```
224
+
225
+
You can install the translation files from `po/*.po` using:
226
+
227
+
```sh
228
+
sudo make install-mo
229
+
```
230
+
231
+
This uses `msgfmt` to compile each `<lang>.po` file to
232
+
`/usr/share/locale/<lang>/LC_MESSAGES/sudo-rs.mo`. If needed, you can override
233
+
the install location by setting `LOCALEDIR` when invoking `make`.
234
+
189
235
[rustup]: https://rustup.rs/
190
236
191
237
## Differences from original sudo
@@ -270,4 +316,4 @@ Sudo-rs is an independent implementation, but it incorporates documentation and
270
316
271
317
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.
272
318
273
-
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/
319
+
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