summary refs log tree commit diff
path: root/pkgs/tools/security
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2014-09-04 15:34:36 +0200
committerBjørn Forsman <bjorn.forsman@gmail.com>2014-09-04 15:39:11 +0200
commitc3436c0c4a683e9a57d91e7f6206d5f3b6530fbf (patch)
treecc8ad90421a67668b98d4ce8230a48ce3461428a /pkgs/tools/security
parentc8e50e28cd362bcf3d91872572ee853c964cdd57 (diff)
downloadnixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.tar
nixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.tar.gz
nixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.tar.bz2
nixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.tar.lz
nixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.tar.xz
nixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.tar.zst
nixpkgs-c3436c0c4a683e9a57d91e7f6206d5f3b6530fbf.zip
sudo: change password prompt
The current sudo password prompt is "Password: ", while distros like
e.g. Ubuntu and Arch Linux use "[sudo] password for %p: ", where "%p"
expands to the username of the user running sudo.

Adopt the prompt from other distros because it makes it less confusing
when running commands with sudo that themselves ask for a password.
Diffstat (limited to 'pkgs/tools/security')
-rw-r--r--pkgs/tools/security/sudo/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/tools/security/sudo/default.nix b/pkgs/tools/security/sudo/default.nix
index 23b7241ace0..167c369e3bb 100644
--- a/pkgs/tools/security/sudo/default.nix
+++ b/pkgs/tools/security/sudo/default.nix
@@ -22,6 +22,10 @@ stdenv.mkDerivation rec {
     "--with-sendmail=${sendmailPath}"
   ];
 
+  configureFlagsArray = [
+    "--with-passprompt=[sudo] password for %p: "  # intentional trailing space
+  ];
+
   postConfigure =
     ''
     cat >> pathnames.h <<'EOF'