1diff --git a/tools/install.sh b/tools/install.sh
2index b7498fa6433e6f528d2e4392ef85f8bcce064a2d..d3f1ee640dc6b33d5462b830401cd066287f14f8 100755
3--- a/tools/install.sh
4+++ b/tools/install.sh
5@@ -64,18 +64,18 @@ user_can_sudo() {
6 # • without privilege: exits with error code 1 and prints the message:
7 # Sorry, user <username> may not run sudo on <hostname>
8 #
9- # 2. Pass `-S` to `sudo` to tell it to get the password from stdin
10- # instead of from a tty, and pipe `true` to `sudo`, since it doesn't
11- # output anything. This will make sudo exit with error code 1 and print
12- # the message:
13- # sudo: no password was provided
14+ # 2. Pass `-n` to `sudo` to tell it to not ask for a password. If the
15+ # password is not required, the command will finish with exit code 0.
16+ # If one is required, sudo will exit with error code 1 and print the
17+ # message:
18+ # sudo: a password is required
19 #
20 # 3. Check for the words "may not run sudo" in the output to really tell
21 # whether the user has privileges or not. For that we have to make sure
22 # to run `sudo` in the default locale (with `LANG=`) so that the message
23 # stays consistent regardless of the user's locale.
24 #
25- true | LANG= sudo -v -S 2>&1 | grep -q "may not run sudo"
26+ LANG= sudo -n -v 2>&1 | grep -q "may not run sudo"
27 }
2829 # The [ -t 1 ] check only works when the function is not called from