Call sudo non-interactively
authorSiraaj Khandkar <siraaj@khandkar.net>
Sat, 31 Oct 2020 03:16:55 +0000 (23:16 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Sat, 31 Oct 2020 03:16:55 +0000 (23:16 -0400)
home/lib/login_functions.sh

index df255d7..0069028 100644 (file)
@@ -520,7 +520,7 @@ motd() {
 
     echo "${indent_unit}servers:"
     # WARN: ensure: $USER ALL=(ALL) NOPASSWD:/bin/netstat
-    sudo netstat -tlnp \
+    sudo -n netstat -tlnp \
     | awk 'NR > 2 {print $7}' \
     | awk -F/ '{print $2}' \
     | sort -u \
This page took 0.026878 seconds and 4 git commands to generate.