cifs-utils 6.7 When asking for a user password, mount.cifs will try to use systemd-ask-password. Since the fix for https://bugzilla.samba.org/show_bug.cgi?id=10054, it relies on popen's search of $PATH. If not found, getpass() is used as a fallback. If systemd-ask-password isn't found, an annoying error message is printed to the terminal before the fallback is used: ubuntu@61-b1:~$ mount /ds216/downloads sh: 1: systemd-ask-password: not found Password for andreas@//ds216.lowtech/downloads: <--- no "***" echoed: getpass() was used ubuntu@61-b1:~$ Since mount.cifs is already using popen, it could silence that error with a simple shell redirection: diff --git a/mount.cifs.c b/mount.cifs.c index 8ca848d..33c1d95 100644 --- a/mount.cifs.c +++ b/mount.cifs.c @@ -1668,7 +1668,7 @@ get_password(const char *prompt, char *input, int capacity) FILE *ask_pass_fp = NULL; cmd = ret = NULL; - if (asprintf(&cmd, "systemd-ask-password \"%s\"", prompt) >= 0) { + if (asprintf(&cmd, "systemd-ask-password \"%s\" 2>/dev/null", prompt) >= 0) { ask_pass_fp = popen (cmd, "re"); free (cmd); }