Sponsored Content
Top Forums Programming Using a script to check the login and username (html) Post 302404159 by hakermania on Monday 15th of March 2010 06:23:44 PM
Old 03-15-2010
Tools Using a script to check the login and username (html)

I made this named "confirm.sh":
Code:
#/bin/sh
#username and password are already given by the login form
if [ -s /home/alex/Desktop/Myfirstsite/allusers/$username ]; then
realpass=`cat /home/alex/Desktop/Myfirstsite/allpasses/$username`
if [ "$password" = "$realpass" ]; then
#continue with index.html
else
echo "Bad password"
fi
else
echo "Unknown username"
fi

because I wanted to make a program that checks if the clues given in the login form like this:
Code:
<table cellpadding=5 cellspacing=0 border=0>
<td style="padding:30"><br>
<form method="post" action="./confrim.sh" name=pform>
<input type="hidden" name="action" value="login">
<input type="hidden" name="user" value="deluxe">
<input type="hidden" name="hide" value="">
<table>
<tr><td><font style="font-family:times;color:Red" face="verdana,arial" size=-1>username?</td><td><input type="text" name="login"></td></tr>
<tr><td><font style="font-family:times;color:Red" face="verdana,arial" size=-1>pass?</td><td><input type="password" name="password"></td></tr>
<tr><td><font  style="font-family:times;color:Red" face="verdana,arial" size=-1>&nbsp;</td><td><font face="verdana,arial" size=-1><input type="submit" value="Enter"></td></tr>
<td colspan=2><font face="verdana,arial" size=-1>&nbsp;</td>
</table>
</form>
</td></tr></table></td></tr></table>
<tr><td colspan=2><font style="font-family:times;color:Red" face="verdana,arial" size=-1>DNot a member? click<a href="./register.html">HERE</a> to become</td></tr>
</html>

As you can see I have selected to start confirm.sh on click.In fact, when I click, the only thing it does is to download confirm.sh to my download folderSmilieSmilieSmilie.How can I told to the html code to call confirm.sh only to confirm the username and the pass? Or, could you suggest me a better way on hoe to do this?(I think I should use <script> but I am not so sure how to use it...)
Sorry for the (maybe) to big answers you meed to write but I am tottaly new to html and so it is quite difficult for me to understand how I have to think.I can use unix scripting quite easily so you dont need to explain me further on this issue!
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to calculate user's last login to check if > 90 days

I need a script to figure out if a user's last login was 90 days or older. OS=AIX 5.3, shell=Korn Here's what I have so far: ==== #!/usr/bin/ksh NOW=`lsuser -a time_last_login root | awk -F= '{ print $2 }'` (( LAST_LOGIN_TIME = 0 )) (( DIFF = $NOW - $LAST_LOGIN_TIME )) lsuser -a... (3 Replies)
Discussion started by: pdtak
3 Replies

2. Solaris

How to : check username & password is same or not in solaris 10 ?

Thanks AVKlinux (5 Replies)
Discussion started by: avklinux
5 Replies

3. Shell Programming and Scripting

trouble with outputting html to check vmfs volumes

Hi - I found a script on the web to check vmfs volumes on ESX servers and create an html file for the output. Sometimes the script works fine, but sometimes it seems to break at the "vdf -h -P" line. More often than not, when I run it myself it works - but when run from chron it usually fails. ... (2 Replies)
Discussion started by: kpowell10
2 Replies

4. Web Development

Login page in html on unix

I want to create a login page in HTML which is hosted on apache server. The login page first authenticate the user and then directed to a form which in turn run a script on the server. I want to make login page without php or jsp. Please advice. (13 Replies)
Discussion started by: ravi18s
13 Replies

5. UNIX for Advanced & Expert Users

Login through SFTP using username and password

Hi All, I want to login to a server through SFTP by giving username and password, in an automated script. I know that this can be done through public key authentication, but my requirement is to login ONLY through username and password. I am using GNU/Linux server. Please advise me !!!... (4 Replies)
Discussion started by: sparks
4 Replies

6. Shell Programming and Scripting

Javascript or HTML to retrieve apache username

I have a internal wesbite set up and any visitor must enter username / passwd as defined in apache (I've set these up using htpasswd) I use cgi scripts set up using ksh or javascript to populate pages / tables etc. I want to be able to get the apache username that the used authorised... (3 Replies)
Discussion started by: frustrated1
3 Replies

7. Shell Programming and Scripting

Simple check login script

Hello, I just started with shell and i am doin simple script to check if certain user is logged in. Script takes 3 args. name sleep time and quit value if there is q for quit then date and user name is printed to file, not to screen. so far i have got this... login() { while :... (3 Replies)
Discussion started by: shelllo
3 Replies

8. Shell Programming and Scripting

Check for Specific Username Password Expire

hey Guys, I haven't posted in a while, But you guys were really helpful alst time. I have had a issue with User Passwords expiring, and since I dont check /var/cron/log on the regular I never know these suers are expiring, making certain nightly jobs not run. With this script, I want to be... (14 Replies)
Discussion started by: gkelly1117
14 Replies

9. Windows & DOS: Issues & Discussions

Login failed username password is incorrect

Hi all, For one of our server (Windows 2008R2), we sometimes will received "login failed username password is incorrect" when login in as domain account (the username & password is correct). Only after a reboot of the server (using local account), we can login without the above error. Can... (2 Replies)
Discussion started by: beginningDBA
2 Replies
LOGIN(8C)																 LOGIN(8C)

NAME
login.krb5 - kerberos enhanced login program SYNOPSIS
login.krb5 [ -fF [username] ] DESCRIPTION
login.krb5 is a modification of the BSD login program which is used for two functions. It is the sub-process used by krlogind and telnetd to initiate a user session and it is a replacement for the command-line login program which, when invoked with a password, acquires Ker- beros tickets for the user. login.krb5 will prompt for a username, or take one on the command line, as login.krb5 username and will then prompt for a password. This password will be used to acquire Kerberos Version 5 tickets and Kerberos Version 4 tickets (if possible.) It will also attempt to run aklog to get AFS tokens for the user. The version 5 tickets will be tested against a local krb5.keytab if it is available, in order to verify the tickets, before letting the user in. However, if the password matches the entry in /etc/passwd the user will be unconditionally allowed (permitting use of the machine in case of network failure.) OPTIONS
-r hostname pass hostname to rlogind. -h hostname pass hostname to telnetd, etc. -f name Perform pre-authenticated login, e.g., datakit, xterm, etc.; allow preauthenticated login as root. -F name Perform pre-authenticated login, e.g.,for datakit, xterm, etc.; allows preauthenticated login as root. -e name Perform pre-authenticated, encrypted login. Must do term negotiation. CONFIGURATION
login.krb5 is also configured via krb5.conf using the login stanza. A collection of options dealing with initial authentication are pro- vided: krb5_get_tickets Use password to get V5 tickets. Default value true. krb4_get_tickets Use password to get V4 tickets. Default value true. krb4_convert Use Kerberos conversion daemon to get V4 tickets. Default value false. If false, and krb4_get_tickets is true, then login will get the V5 tickets directly using the Kerberos V4 protocol directly. This does not currently work with non MIT-V4 salt types (such as the AFS3 salt type.) Note that if configuration parameter is true, and the krb524d is not running, login will hang for approxi- mately a minute under Solaris, due to a Solaris socket emulation bug. krb_run_aklog Attempt to run aklog. Default value true. aklog_path Where to find it [not yet implemented.] Default value $(prefix)/bin/aklog. accept_passwd Don't accept plaintext passwords [not yet implemented]. Default value false. DIAGNOSTICS
All diagnostic messages are returned on the connection or tty associated with stderr. SEE ALSO
rlogind(8C), rlogin(1C), telnetd(8c) BUGS
Should use a config file to select use of V5, V4, and AFS, as well as policy for startup. LOGIN(8C)
All times are GMT -4. The time now is 07:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy