Hi, On Sun, Mar 29, 2020 at 4:34 PM <selva.n...@gmail.com> wrote: > > From: Selva Nair <selva.n...@gmail.com> > > If only username is found in the file, redirect the auth-user-pass > query to the management on Windows if (i) management-query-passwords > is enabled and (ii) stdout is redirected to a log file. These > restrictions avoid regressive behaviour: those running from the > command line will continue to get the prompt on the console > and if both username and password are in the file those will > continue to get used. > > Note that the management will prompt for both username and password > ignoring the username read from the file. As the GUI saves the > username, this is a one-time inconvenience. > > Currently, the password is queried on the console (or systemd) > in such cases. This is not sensible on windows if log file is > redirected (prompt goes to the log file), or the console > is not available as happens when the GUI is in use.
Why only Windows? I'd like this for macOS, too! On a Mac using Tunnelblick (which uses the management interface with management-query-passwords enabled), if the auth-user-pass file contains only the password (and a LF), then the following occurs: neither stdin nor stderr are a tty device and you have neither a controlling tty nor systemd - can't ask for 'Enter Auth Password:'. If you used --daemon, you need to use --askpass to make passphrase-protected keys work, and you can not use --auth-nocache. Exiting due to fatal error Note: Tunnelblick uses the "--log" option to redirect output to a file. I am assuming that's what is meant by "stdout is redirected to a log file". It would be nice to have the same behavior on both Windows and Mac. For Tunnelblick, too, the username from the file would be lost but, as with the Windows GUI, the user can opt to save it so it isn't asked for again. Best regards, Jon Bullard _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel