<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Auth-user-pass-verify /usr/local/sbin/verify.sh via-file not working/authenticat]]></title><description><![CDATA[<p dir="auto">I need help with auth-user-pass-verify.  I was able to use this script on my dd-wrt router and it worked perfect, but when I try to use it on pfSense OpenVPN it does not authenticate me.  Can someone please help me fix this?</p>
<pre><code>
#!/bin/sh

 ## format: username:password username:password ...
 ## you can even have same usernames with different passwords
 USERS='user1:pass1 user2:pass2 user3:pass3'

 ## you could put username:password in
 ## a separate file and read it like this
 #USERS=`cat file_with_users`

 vpn_verify() {
     if [[ ! $1 ]] || [[ ! $2 ]]; then
         #echo "No username or password: $*"
         exit 1
     fi

     ## it can also be done with grep or sed
     for i in $USERS; do
         if [[ "$i" == "$1:$2" ]]; then

             ## you can add here logging of users
             ## if you have enough space for log file
             #echo `date` $1:$2 &gt;&gt; your_log_file

             exit 0
         fi
     done
 }

 if [[ ! $1 ]] || [[ ! -e $1 ]]; then
     #echo "No file"
     exit 1
 fi

 ## $1 is file name which contains
 ## passed username and password
 vpn_verify `cat $1`

 #echo "No user with this password found"
 exit 1

</code></pre>
]]></description><link>https://forum.netgate.com/topic/75789/auth-user-pass-verify-usr-local-sbin-verify-sh-via-file-not-working-authenticat</link><generator>RSS for Node</generator><lastBuildDate>Tue, 10 Nov 2026 15:08:36 GMT</lastBuildDate><atom:link href="https://forum.netgate.com/topic/75789.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 13 Nov 2014 01:56:28 GMT</pubDate><ttl>60</ttl></channel></rss>