From dd2d78c7d6755ac3c9e0274b97815aebf20dabb7 Mon Sep 17 00:00:00 2001 From: Arnaud Rebillout Date: Tue, 5 Apr 2022 07:48:13 +0700 Subject: [PATCH] get_user_list: output warning to stderr The function get_user_list returns a list of users on stdout, so obviously it can't use stdout to also display messages. Use stderr instead. Note that we could also silently skip if we find a directory in /home that is not a user. Does it happen in practice? --- kali-config/common/includes.installer/kali-finish-install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kali-config/common/includes.installer/kali-finish-install b/kali-config/common/includes.installer/kali-finish-install index df55102..42db0ee 100755 --- a/kali-config/common/includes.installer/kali-finish-install +++ b/kali-config/common/includes.installer/kali-finish-install @@ -28,7 +28,7 @@ END get_user_list() { for user in $(cd /home && ls); do if ! getent passwd "$user" >/dev/null; then - echo "WARNING: user '$user' is invalid but /home/$user exists" + echo "WARNING: user '$user' is invalid but /home/$user exists" >&2 continue fi echo "$user"