Linux - Sorry, 'Auth' password cannot be read from a file

Scripts to manage certificates or generate config files

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
INeverWantedAnAccount
OpenVpn Newbie
Posts: 6
Joined: Thu Mar 17, 2016 6:25 am

Linux - Sorry, 'Auth' password cannot be read from a file

Post by INeverWantedAnAccount » Thu Mar 17, 2016 6:32 am

Hi, I'm using Debian based CLI OS and I'm trying to get my VPN to know my username and password without me having to type it every time. When I configure my .conf file with "auth-user-pass auth.txt" I get the above error. Googling shows I need to build OpenVPN myself with: https://openvpn.net/index.php/open-sour ... stall.html the following option: --enable-password-save

Attempt to configure the build and get the following option:
configure: WARNING: unrecognized options: --enable-password-save

Can anyone tell me how I can use an auth file please? I appreciate that it's not the most secure but my VPN provider doesn't provide certificates.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by Traffic » Thu Mar 17, 2016 12:11 pm

What version of openvpn are you using ?

Code: Select all

$ sudo openvpn --version

INeverWantedAnAccount
OpenVpn Newbie
Posts: 6
Joined: Thu Mar 17, 2016 6:25 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by INeverWantedAnAccount » Thu Mar 17, 2016 7:09 pm

Running OpenVPN 2.3.8 x86_64-unknown-linux-gnu

Trying to compile the latest from OpenVPN.

INeverWantedAnAccount
OpenVpn Newbie
Posts: 6
Joined: Thu Mar 17, 2016 6:25 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by INeverWantedAnAccount » Thu Mar 17, 2016 7:40 pm

I'm not sure if my last post wasn't submitted or has to be authorised so apologies if this is a double post.

I'm trying to build the latest version of OpenVPN as per the website.

Currently installed is: OpenVPN 2.3.8 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Sep 30 2015

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by Traffic » Thu Mar 17, 2016 7:47 pm

Traffic wrote:What version of openvpn are you using ?

Code: Select all

$ sudo openvpn --version
Post full details.

INeverWantedAnAccount
OpenVpn Newbie
Posts: 6
Joined: Thu Mar 17, 2016 6:25 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by INeverWantedAnAccount » Thu Mar 17, 2016 8:15 pm

No worries!

OpenVPN 2.3.8 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Sep 30 2015
library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=no enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by Traffic » Thu Mar 17, 2016 10:16 pm

INeverWantedAnAccount wrote:OpenVPN 2.3.8 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Sep 30 2015
<snip>
enable_password_save=no
However:

Code: Select all

root@deb-760-live:~# uname -a
Linux deb-760-live 3.2.0-4-686-pae #1 SMP Debian 3.2.73-2+deb7u3 i686 GNU/Linux
root@deb-760-live:~# openvpn --version
OpenVPN 2.3.10 i486-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  4 2016
library versions: OpenSSL 1.0.1k 8 Jan 2015, LZO 2.08
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=no enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=no enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=yes enable_pedantic=no enable_pf=yes enable_pkcs11=yes enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no
So:
OpenVPN 2.3.10 i486-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan 4 2016
For:
enable_password_save=yes
Keep your system up to date .. :mrgreen:

INeverWantedAnAccount
OpenVpn Newbie
Posts: 6
Joined: Thu Mar 17, 2016 6:25 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by INeverWantedAnAccount » Fri Mar 18, 2016 5:27 am

Code: Select all

Linux computer 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u1 x86_64 GNU/Linux

aptitude update & aptitude upgrade =

Code: Select all

root@computer $ aptitude update
<snip>
Hit http://ftp.uk.debian.org wheezy-updates Release                             
etc
</snip>
root@computer $ aptitude upgrade
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
I can only update as fast as my repositories are updated.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by Traffic » Fri Mar 18, 2016 12:09 pm


INeverWantedAnAccount
OpenVpn Newbie
Posts: 6
Joined: Thu Mar 17, 2016 6:25 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by INeverWantedAnAccount » Fri Mar 18, 2016 6:43 pm

Now I'm confused. Added the repository:

Code: Select all

Package: openvpn                         
State: installed
Automatically installed: no
Version: 2.3.10-debian0
Priority: optional
Section: net
Maintainer: Samuli Seppänen <samuli@openvpn.net>
Architecture: amd64
Uncompressed Size: 1,097 k
Depends: debconf (>= 0.5) | debconf-2.0, libc6 (>= 2.3.2), liblzo2-2, libpam0g
         (>= 0.99.7.1), libpkcs11-helper1 (>= 1.05), libssl1.0.0 (>= 1.0.0a),
         openssl-blacklist (>= 0.4), openvpn-blacklist, net-tools
Suggests: openssl, resolvconf, easy-rsa
etc.

Code: Select all

$ sudo openvpn --version
OpenVPN 2.3.8 x86_64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Sep 30 2015
library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=no enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=no enable_pedantic=no enable_pf=yes enable_pkcs11=no enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no
Just need to replace the original with /usr/sbin/openvpn.

Code: Select all

$ sudo /usr/sbin/openvpn --version
OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  4 2016
library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=no enable_def_auth=yes enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=yes enable_fragment=yes enable_http_proxy=yes enable_iproute2=no enable_libtool_lock=yes enable_lzo=yes enable_lzo_stub=no enable_management=yes enable_multi=yes enable_multihome=yes enable_pam_dlopen=no enable_password_save=yes enable_pedantic=no enable_pf=yes enable_pkcs11=yes enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_small=no enable_socks=yes enable_ssl=yes enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=no enable_win32_dll=yes enable_x509_alt_username=no with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_plugindir='$(libdir)/openvpn/plugins' with_sysroot=no
Either way, it works. Thank you so much.

User avatar
Traffic
OpenVPN Protagonist
Posts: 4066
Joined: Sat Aug 09, 2014 11:24 am

Re: Linux - Sorry, 'Auth' password cannot be read from a fil

Post by Traffic » Fri Mar 18, 2016 7:18 pm

INeverWantedAnAccount wrote:Googling shows I need to build OpenVPN myself with: <url> the following option: --enable-password-save
INeverWantedAnAccount wrote:

Code: Select all

$ sudo /usr/sbin/openvpn --version
OpenVPN 2.3.10 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [MH] [IPv6] built on Jan  4 2016
library versions: OpenSSL 1.0.1e 11 Feb 2013, LZO 2.06
<..>
enable_password_save=yes
Now you have enable_password_save=yes with openvpn 2.3.10
INeverWantedAnAccount wrote:Either way, it works. Thank you so much.
Thanks for letting us know you have a solution 8-)

Post Reply