Quote:
#!/bin/bash
### Database Informations
DBUSER='user'
DBPASS='pass'
DBHOST='localhost' #use ip kng external ang mysql server nyo if not localhost lng
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 = PASSWORD('$pass_word')) );" $DBNAME`
if [ "$user_query" == "$user_name" ]; then
exit 0
else
exit 1
fi
|
hi
im using this kind of script for authentication process
the problem is, no one could connect authentication failed
does anyone know what was the problem?
in using ubuntu 10.10, mysql and phpmyadmin
i hope someone could help me
thank you