hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : VPS Hosting : VPS Tutorials : openvpn remote authentication via bash script
Reply

VPS Tutorials Tutorials related to VPS.
Forum Jump

openvpn remote authentication via bash script

Reply Post New Thread In VPS Tutorials Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 09-13-2011, 04:04 AM
eric6630 eric6630 is offline
Newbie
 
Join Date: Mar 2011
Posts: 20

openvpn remote authentication via bash script


hi

im using cent OS 5.6 and im a confused how it's to be done exactly the way i want it to be.

can somebody help me?

thank you

Reply With Quote


Sponsored Links
  #2  
Old 09-14-2011, 09:40 PM
VMStormVPS Dave G VMStormVPS Dave G is offline
Aspiring Evangelist
 
Join Date: Oct 2006
Location: State College, PA USA
Posts: 367
What exactly are you trying to achieve?

Give us a little more info and we can help out.

Best,
Dave

Reply With Quote
  #3  
Old 09-14-2011, 09:45 PM
eric6630 eric6630 is offline
Newbie
 
Join Date: Mar 2011
Posts: 20
Quote:
#!/bin/bash
### Database Informations
DBUSER='user'
DBPASS='pass'
DBHOST='x.x.x.x'
DBNAME='dbase'

user_name=`head -n1 $1 | tail -1` #first line -> Username
pass_word=`head -n2 $1 | tail -1 ` #second line -> Password

user_query=`mysql -u $DBUSER -p$DBPASS -D $DBNAME -h $DBHOST --skip-column-name -e "SELECT username FROM user WHERE ( (active = '1') AND (username = '$user_name') AND (password = ('$pass_word')) );" $DBNAME`

if [ "$user_query" == "$user_name" ]; then
exit 0
else
exit 1
fi
server connection is good but i guess the problem is on my sqlquery can't retrieve info and compare it from authentication purposes

Quote:
user_query=`mysql -u $DBUSER -p$DBPASS -D $DBNAME -h $DBHOST --skip-column-name -e "SELECT username FROM user WHERE ( (active = '1') AND (username = '$user_name') AND (password = ('$pass_word')) );" $DBNAME`
can you help me?

Reply With Quote
Sponsored Links
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Bash Script] How to set up redirect of script output within script 96mb Programming Discussion 2 07-17-2011 09:10 PM
Firewall + OTP authentication for remote access grob115 Hosting Security and Technology 0 07-17-2010 11:26 AM
[ASK] how to make openVPN client connection into Remote IP Server YoungRichest Hosting Security and Technology 5 06-22-2010 06:50 AM
Can .htaccess call a script (e.g. a bash .sh script)? Kadence Hosting Security and Technology 7 03-26-2008 03:59 PM
bash comman/bash script getbusy Hosting Security and Technology 2 12-25-2004 06:50 PM

Related posts from TheWhir.com
Title Type Date Posted
Parallels Integrates CertiVox SkyPin Multi-Factor Authentication Across Plesk, Automation Web Hosting News 2012-09-24 17:00:37
Web Host ViaWest Gets Efficient with Opengear Solutions Web Hosting News 2012-02-28 17:04:18
Q&A: Brian Trzupek on Authentication Solution Trustwave MyIdentity Web Hosting News 2011-12-20 16:20:44
Trustwave Launches Cloud-Based Authentication Solution MyIdentity Web Hosting News 2011-12-06 21:03:44
Stonesoft Releases Secure Authentication Portal for Cloud Environments Web Hosting News 2011-09-30 17:51:25


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?