Telnet login validation.

HI,
I have a Java GUI app that telnets to a unix box and executes some commands. Everything works fine if the login/password is correct, but I don't really have a solution to check for login failure messages. The program need to determine whether the login was successfull or not. One way that I tought of was to look for the return string from the server and if it say "Login invalid", or "Account locked by .." or simillar messages, then the login failed. But this solution is not really what I'd like to use, because first I don't know what are all the login error messages that the server throws, and also whether these messages are universal.
Any help is appreciated.
Thanks.

I am using telnet source from javatelnet.org (javassh.org). I doesn't really give me a solution to my problem. The code assumes that the user can see the return string from the telnet app and determine what to do next. Here is the code:
public void connect() throws NetworkException
try
     LogPane.writeMedic("Connecting to " + serverName + " for " + username);
     rpcSession.connect(serverName, port);
     rpcSession.login(username, password);
rpcSession.setPrompt(PROMPT);
     rpcSession.send("export PS1='" + PROMPT + "'"));     
     rpcSession.waitfor(PROMPT);
catch (IOException e)
     //          LogPane.writeError("Error! Connecting to " + serverName);
               throw new NetworkException("Error! Connecting to " + serverName);
     //     e.printStackTrace();
login code from rpcSession:
public synchronized void login(String username, String password) throws IOException
byte[] b = new byte[256];
int n = 0;
waitfor("login:");
     send(username);
     waitfor("Password:");
     send(password);
The program waits for "login" and "password" and send their values and then it waits for the prompt, it only works if the login is successfull.
     

Similar Messages

  • How is the Login-validation.xml file is called when we do the validation i

    Hi ^^,
    please forgive me if I am a big long while explaining.
    when you are using the struts 2.0 the web.xml has a welcome-file-list. I have put index.html in that list so it pulls up first.
    It has the following tag
    <ul>
              <li><a href="roseindia/showLoginClientSideValidation.action">Login Application (Client Side Validation)</a></li>
            </ul>so this maps to struts.xml which contains the showLoginClientSideValidation.action tag
    <action name="showLoginClientSideValidation">
                   <result>/pages/loginClientSideValidation.jsp</result>
            </action>
            <action name="doLoginClientSideValidation" class="net.roseindia.Login">
                <result  name="input">/pages/loginClientSideValidation.jsp</result>
                   <result  name="error">/pages/loginClientSideValidation.jsp</result>
                   <result>/pages/Loginsuccess.jsp</result>
            </action>
              this displays the jsp "loginClientSideValidation.jsp"
    once you enter the details in the jsp and click submit the control goes to Login.java file as per the mapping in struts.xml given above
    This is just a simple java file which contains the execute() method. This method returns success or error.
    If success is returned then the Loginsuccess.jsp is invoked
    If error is returned then the loginClientSideValidation.jsp is invoked
    Well so far so good
    I have also understood that to use client side validation you use validate = "true" in loginClientSideValidation.jsp
    However what I am not able to understand is how the Login-validation.xml file is being invoked
    Any help would be highly appreciated.
    thanks and regards,

    Hi ^^^,
    i found something interesting that I want to share
    Validation rules are handled by validators, which must be registered with the ValidatorFactory (using the registerValidator method). The simplest way to do so is to add a file name validators.xml in the root of the classpath (/WEB-INF/classes) that declares all the validators you intend to use.
    validators.xml if being defined should be available in the classpath. However this is not necessary, if no custom validator is needed. Webwork will automatically picked up a predefined sets of validators defined in com/opensymphony/xwork/validator/validators/default.xml packaged together in xwork jar file that comes with webwork distribution.
    So this is clear that the validators are defined in validators.xml or default.xml
    What is still not clear is how is the Login-validation.xml being called by jsp page to do verification and then linking to validators.xml to apply the rules.
    However people have been telling me that ----" Struts 2.0 have inbuilt functionalities to validate the Parameters" and that i need to
    "Define configuration file *-validation.xml or use annotations
    i) className-validation.xml
    ii) place this file in the directory where .class file is placed example.Login should have Login-validation.xml
    Do you all think is this sufficient for an answer or should my search go on?
    thanks and regards,
    Prashant
    Edited by: pksingh79 on Sep 13, 2008 10:08 AM

  • Solaris 9 denies a telnet login

    Hi, Can you tell me where Solaris 9 is configured to deny a telnet login. I need to turn this feature off.
    Thanks

    Yes, I did forget to comment out the "CONSOLE" field in my /etc/default/login file. Everything seems to be ok. Thanks for your time.

  • AOL Tests, AOL Session sysadmin login validation failed...

    Hi, I ran the "CRM Foundation" diagnostic checks and got this as a failed test. My sysadmin login works fine when logging in to applications. I checked on Metalink and google for various pastes from this error and can't find anything. Anyone know (1) what this is, (2) how it can be fixed? Thanks!      
         Group Name:      AOLTests      
         Component Name:      AOL Session      
         Class Name:      oracle.apps.jtf.regress.qatool.testcase.authenticateTest      
         Version:      115.9      
         Description:      To authenticate the user.      
         Authentication Test Report
    Current Execution      
    Date:      2009-05-11 18:09:18.0 Time Consumed: 23 milliseconds Status: Failed
    Version Info:      
         oracle.apps.fnd.common.WebAppsContext 115.160
         oracle.apps.fnd.security.SessionManager 115.172
    Inputs:      
         username= SYSADMIN
         password= ******
         Diagnostic Test Executed By= SYSADMIN
    Error:      
         Login validation failed
    Help:      
         Check if SYSADMIN is a valid AOL user

    I believe this is a known issue - see MOS Doc 146438.1 (CRM AOLSessions Authentication Test Diagnostic Error That Login Failed)
    HTH
    Srini

  • Emac hangs at login, valid passwords no longer work

    My daughter's emac, running 10.4.8, hangs at login during startup. Just the spinning disc. I started up from the original disc and used disk utility to repair disk and repair permissions. Starting up in Safe Boot mode i get as far as the password prompt but when the correct passwords are entered the screen image shimmies back and forth. I have reset the passwords using the startup disk and it continues to happen. I know that the passwords are reset becuse the new prompt shows up.
    Any help would be appreciated.
    AD

    That question has come up before bout that Knowledge Base article; all of the tips and suggestions in that remain valid under 10.4 (I suspect the article was retitled when Tiger first came out, in anticipitation of a never-needed Tiger version of the same article).
    Would you know if anyone had been playing around with keyboard inputs in System Preferences? That's a 'gotcha' where if someone is playing around with the settings and decides to set say Dvork keyboard as the input method, normal Roman keyboard keystrokes will be putting out the wrong characters. (That happened on one lab Mac once; after figuring out the problem, I used a Dvork keyboard map to translate the desired password into Dvork-equivalant keystrokes.)

  • Login Validations in JavaScript

    hi all,
    i wanna javascript code for Client side validations to my login page
    Login Page:
    UserName :
    Password:

    Plz try this
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      <head>
      <meta http-equiv="content-type" content="text/html; charset=windows-1250">
      <meta name="generator" content="PSPad editor, www.pspad.com">
      <title>Login</title>
      <script language="JavaScript">
         function validate(){
            var uName = document.forms[0].uName;
            var pwd = document.forms[0].pwd;
            if(uName.value.length <1){
              alert("Enter username");
              return false;
            if(pwd.value.length <6){
              alert("Password must be atleast 6 char");
              return false;
            return true;
      </script>
      </head>
      <body>
        <TABLE width="100%" height="100%">
                   <TR>
                        <TD align="center" valign="middle">
              <form action="/Login" name="form1" onSubmit="return validate();">
                <table>
                  <tr>
                    <td>UserName :</td><td><input type="text" name="uName"></td>
                  </tr>
                  <tr>
                    <td>Password :</td><td><input type="password" name="pwd"></td>
                  </tr>
                  <tr>
                    <td><input type="submit" value="Login"></td>
                    <td><input type="reset" value="clear"></td>
                  </tr>
                </table>
              </form>
            </TD>
                   </TR>
              </TABLE>
      </body>
    </html>

  • Login validation to oracle OTL HRMS

    Hi,
    I need to implement java web services for OTL timesheet. Could someone guide how Can login implements. If it call some procedure.
    how Can get resource_id used in creating timecard
    hxc_timestore_deposit.create_time_entry ( p_measure=> 8, p_day => FND_DATE.CANONICAL_TO_DATE ('2002/09/02'), p_resource_id=> 9389, -- Identifies a person on our DB, REPLACE WITH YOUR IDs p_deposit_process_id=> 'OTL Deposit Process' p_app_blocks=> l_tbl_timecard_info, p_app_attributes=> l_tbl_attributes_info, p_time_building_block_id=> l_time_building_block_id )
    Thanks

    Hi,
    How can we login to oracle e-businees suite by extenal web service. In our Oracle time and labor it takes employee id and password.
    Thanks

  • Access control after telnet

    Hi Pros,
    I have been thinking and finding solution about how to configure the telent to run a script once user login to linux server vi telnet.
    the expected result after login are as below, there is a message shown
    1.FolderA
    2.FolderB
    3.Execute C
    4.Exit
    User only have to choose the number 1~9 to access the folder or run the script, they don't have the chance or permission to cd/ls..., not alone create folder.
    Please advise how can I implement it.
    thanks a lot
    Henry

    Wondering about your question to disable Ctrl-C.... Do you actually mean to script a telnet login to choose from a menu option, or to create a interacive menu that is shown to the user at login?
    For instance:
    #!/bin/sh
    ctrl_c() {
        echo "Press 3 to exit"
    opt1 () {
       cd /home/A
    opt2 () {
       cd /home/B
    trap ctrl_c INT
    quit="no"
    while [ $quit != "yes" ]
    do
       echo "1. Folder A"
       echo "2. Folder B"
       echo "3. Quit"
       echo -n "Your choice? : "
       read choice
       case $choice in
          1) opt1 ;;
          2) opt2 ;;
          3) quit="yes" ;;
          *) echo "\"$choice\" is not valid"
              sleep 2 ;;
       esac
    done

  • Visio 2010 Link a Stencil to Telnet

    Good morning everyone,
    I have been searching Google for two days now on how to link a Visio 2010 Stencil to Telnet so that when you hold control and click the stencil it brings you to the telnet login prompt for that router or switch.
    I went to insert hyperlink, then chose local file, and linked to telnet.exe for starters. When I ctrl+click on a stencil I get a security warning asking if I want to continue; I clicked yes, but nothing happened. For kicks, I even tried clicking No and
    still nothing happens.
    I then tried creating a shortcut to telnet and pointing the hyperlink to that local file with no luck.
    Lastly I wrote a .bat file and tried to get the .bat file to launch telnet to my router/switch, and that works if I directly open the .bat file but does not link from Visio.
    Does anyone know how I can simply make Visio 2010 so that I can click on the stencil and it auto opens telnet prompt allowing me to login to that device?
    Thank you

    The technique the example uses requires modifications to the shape (thus making them unique on the page) and the code then calls an executable that accepts command line options and enters the appropriated operands to the call (ip address, port, etc.).
    This is the 'easy' way to accomplish calling the telnet session. Be aware that as of Win7 calling command line executables via a browser was modified to make it more difficult.
    al edlund
    Al Edlund Visio MVP

  • ICal yields "Error during PUT for mailto:valid@email: iMIP request failed"

    Hello,
    I'm trying to bring up an iCal server (using Mac OS X Lion 10.7.3 Server on a Mac Mini). The basic configuration runs fine. But when I tried to enable eMail invitations, I got stuck with those messages in the error log:
    [twistedcaldav.scheduling.imip#error] Could not do server-to-imip request : <twistedcaldav.scheduling.imip.ScheduleViaIMip object at 0x10075e5d0> User timeout caused connection failure.
    [twistedcaldav.scheduling.scheduler.ScheduleResponseQueue#error] Error during PUT for mailto:valid@email: iMIP request failed
    My configuration settings:
    calendar:Scheduling:CalDAV:EmailDomain = ""
    calendar:Scheduling:CalDAV:HTTPDomain = ""
    calendar:Scheduling:CalDAV:AddressPatterns = _empty_array
    calendar:Scheduling:iMIP:Sending:Server = "valid.mail.server"
    calendar:Scheduling:iMIP:Sending:UseSSL = no
    calendar:Scheduling:iMIP:Sending:Username = "valid@email"
    calendar:Scheduling:iMIP:Sending:Address = "valid@email"
    calendar:Scheduling:iMIP:Sending:Password = "safe_password"
    calendar:Scheduling:iMIP:Sending:Port = 25
    calendar:Scheduling:iMIP:Enabled = yes
    calendar:Scheduling:iMIP:MailGatewayPort = 62310
    calendar:Scheduling:iMIP:Receiving:Server = "valid.mail.server"
    calendar:Scheduling:iMIP:Receiving:UseSSL = yes
    calendar:Scheduling:iMIP:Receiving:Username = "valid_email"
    calendar:Scheduling:iMIP:Receiving:PollingSeconds = 30
    calendar:Scheduling:iMIP:Receiving:Type = "imap"
    calendar:Scheduling:iMIP:Receiving:Password = "safe_password"
    calendar:Scheduling:iMIP:Receiving:Port = 993
    calendar:Scheduling:iMIP:AddressPatterns:_array_index:0 = "mailto:.*"
    calendar:Scheduling:iMIP:MailGatewayServer = "valid.mail.server"
    calendar:Scheduling:iSchedule:Enabled = no
    calendar:Scheduling:iSchedule:Servers = "servertoserver.xml"
    calendar:Scheduling:iSchedule:AddressPatterns = _empty_array
    It does not even try to connect to the given smtp server. How do I proceed?

    I dug into the sources, and am now smarter
    the above settings are invalid, because of the gateway (this has to be iCal itself):
    calendar:Scheduling:iMIP:MailGatewayServer = "localhost"
    Now the IMAP server is being asked, but now I have the next problem:
    [mailgateway] 2012-03-27 11:14:37+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadFactory#debug] Scheduling next IMAP4 poll
    [mailgateway] 2012-03-27 11:15:07+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] RECEIVED: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
    [mailgateway] 2012-03-27 11:15:07+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] IMAP servergreeting
    [mailgateway] 2012-03-27 11:15:07+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] SENDING: 0001 AUTHENTICATE PLAIN
    [mailgateway] 2012-03-27 11:15:07+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] RECEIVED: +
    [mailgateway] 2012-03-27 11:15:07+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] SENDING: 1GNhbEwhZHNwZXJ0LmRlAFlpZXE5YW==
    [mailgateway] 2012-03-27 11:15:09+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] RECEIVED: 0001 NO [AUTHENTICATIONFAILED] Authentication failed.
    [mailgateway] 2012-03-27 11:15:09+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] IMAP authenticate failed for valid@email, trying login
    [mailgateway] 2012-03-27 11:15:09+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] SENDING: 0002 LOGIN "valid@email" "valid_password"
    [mailgateway] 2012-03-27 11:15:16+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#debug] RECEIVED: 0002 NO [AUTHENTICATIONFAILED] Authentication failed.
    [mailgateway] 2012-03-27 11:15:16+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadProtocol#error] IMAP login failed for valid@email
    [mailgateway] 2012-03-27 11:15:16+0200 [IMAP4DownloadProtocol,client] [twistedcaldav.mail.IMAP4DownloadFactory#debug] IMAP factory connection lost

  • LMS 3.2 and RME 4.3.1 telnet with tacacs+ fails

    Hi everyone,
    I'm having issue with credentials verification for telnet with TACACS+ enabled. Verification job fails with "Telnet: Incorrect" and an exception to daemons.log:
    om.cisco.nm.lib.cmdsvc.CmdSvcException: com.cisco.nm.lib.cmdsvc.telnet.TelnetException: Unable to read from socket
            at com.cisco.nm.lib.cmdsvc.TelnetSession.connect(TelnetSession.java:89)
            at com.cisco.nm.lib.cmdsvc.Session.connect(Session.java:152)
            at com.cisco.nm.lib.cmdsvc.AuthHandler.connect(AuthHandler.java:254)
            at com.cisco.nm.lib.cmdsvc.OpConnect.invoke(OpConnect.java:56)
            at com.cisco.nm.lib.cmdsvc.SessionContext.invoke(SessionContext.java:299)
            at com.cisco.nm.lib.cmdsvc.Engine.process(Engine.java:57)
            at com.cisco.nm.lib.cmdsvc.LocalProxy.process(LocalProxy.java:22)
            at com.cisco.nm.lib.cmdsvc.CmdSvc.connect(CmdSvc.java:190)
            at com.cisco.nm.lib.cmdsvc.CmdSvc.connect(CmdSvc.java:166)
            at com.cisco.nm.xms.xdi.pkgs.LibDcma.persistor.CliOperator.<init>(CliOperator.java:214)
            at com.cisco.nm.xms.xdi.pkgs.SharedDcmaIOS.transport.IOSCliOperator.<init>(IOSCliOperator.java:116)
            at com.cisco.nm.xms.xdi.pkgs.SharedDcmaIOS.transport.CatIOSSwitchCliOperator.<init>(CatIOSSwitchCliOperator.java:56)
            at com.cisco.nm.xms.xdi.pkgs.SharedDcmaIOS.transport.Cat6kIOSCliOperator.<init>(Cat6kIOSCliOperator.java:32)
            at com.cisco.nm.xms.xdi.pkgs.SharedDcmaIOS.transport.Cat6kIOSConfigOperator.getOperator(Cat6kIOSConfigOperator.java:35)
            at com.cisco.nm.xms.xdi.pkgs.LibDcma.persistor.OperatorCacheManager.getOperatorForDevice(OperatorCacheManager.java:50)
            at com.cisco.nm.xms.xdi.pkgs.LibDcma.persistor.ConfigOperation.doConfigOperation(ConfigOperation.java:99)
            at com.cisco.nm.xms.xdi.pkgs.SharedDcmaIOS.transport.IOSConfigOperator.fetchConfig(IOSConfigOperator.java:73)
            at com.cisco.nm.rmeng.dcma.configmanager.ConfigManager.updateArchiveForDevice(ConfigManager.java:658)
            at com.cisco.nm.rmeng.dcma.configmanager.ConfigManager.performCollection(ConfigManager.java:1646)
            at com.cisco.nm.rmeng.dcma.configmanager.CfgUpdateThread.run(CfgUpdateThread.java:27)
    I've tried to edit TacacsPrompts.ini also with suggestion to enter "," after last space character
    I'm using only TACACS so all prompts are the same. I'm using MOTD also.
    TACACS prompt looks like this example : "TEST username: ,TEST password: " so this looks obvious.
    The issue started to appear after some patching done to RME and CiscoView, but I'm not sure that this is connected anyhow.
    Thanks for all the help

    Hi!
    They gave me the solution like this:
    line vty
    timeout login response 90
    Ofcourse it helped but this it still inproper behavior from LMS side. It sends the username char by char for more than a minute! Guess the scenario with thousands of devices.... It will take ages to telnet to them. And network performance has nothing to do with that - i'm running the LMS on a powerful Sun and the network is mostly gigabit connected.
    Setting timeout login response is a workaround but does not fix the problem.
    Still waiting fot some fix to LMS not for fairly acceptable workarounds.
    This is NOT case with TACACS enabled on a router. The box responds within moment when telneted using commandline or other NMS software. This is a problem with LMS telnet login mechanism and prompt parsing (TacacsPrompts.ini doesn't seem to work at all, I could type there anything and it has no effect on the login proces).
    Besides this SSH to the same box wit TACACS works flawlessly. But then it parses only password prompt not the username - this is sent by ssh.

  • Account names can break LDAP logins?

    I've successfully installed and patched (patches 118833-36, 119963-08 and 122032-05) my Solaris 10 system so it's using LDAP against the Sun Java System Directory Server Enterprise Edition 6.2.
    On my test box, I have several test accounts setup.
    On the one that is simply my last name, everything works fine. SSH logins, telnet logins, and password changes. SO I'm sure the pam.conf and nsswitch.conf works right.
    On several other accounts, they work just as well.
    However two accounts do not. getent -v | grep username shows the accounts. I can "su - account" from root and get in fine. However if I try to SSH or telnet in it rejects my password. The password being entered IS correct.
    The one thing they have in common is that they are both contractor accounts, which due to corporate standards are
    8 numeric digits starting with an 8, so something like 81234567 would be a contractor ID.
    Renaming the bad contractor accounts in the LDAP editor (but NOT changing the password) allows me to SSH in.
    Renaming the test account with my last name to a contractor style name breaks it.
    I read "man -s 4 passwd" and couldn't find where our naming standard violates the Solaris system standard.
    Thoughts?

    From the Solaris 10 Basic System Admin Guide at: http://docs.sun.com/app/docs/doc/817-1985/6mhm8o5l8?a=view#userconcept-30
    "User names � They should contain from two to eight letters and numerals. The first character should be a letter. At least one character should be a lowercase letter."
    Sun probably should have used the word "must" instead of "should." ie. First letter must be a letter.
    The system behavior you are describing seems to bear this out.

  • After login close the login window and open home page in new window

    Hi guys,
    I want to go to a new window for the "home page" without browser back button etc. after login validation.
    And also close the login window at the same time.
    Here is the code I used after the login validation.
    ExtendedRenderKitService erks =Service.getRenderKitService(FacesContext.getCurrentInstance(),ExtendedRenderKitService.class);
    StringBuilder script = new StringBuilder();
    script.append(" params = 'width='+screen.availWidth-10;\n" +
    " params += ', height='+screen.availHeight-50;\n" +
    " params += ', top=0, left=0'\n" +
    " params += ', fullscreen=yes';\n" +
    " params += ', scrollbars=1';\n" +
    " params += ', resizable=1';\n" +
    " params += ', status=1';\n" +
    "window.close();\n" +
    " newwin=window.open('home.jspx','xxxxxxxxx', params);\n" +
    " if (window.focus) {newwin.focus()}");
    erks.addScript(FacesContext.getCurrentInstance(), script.toString());
    This successfully opens a new window. I want to close the current login window at the same time.
    Please help me with this.
    Regards !
    Sameera

    on the 'Submit' onclick event add some JavaScript code:
    this.form.target = '_blank';

  • SG300-28 RADIUS login

    Hi,
    I have some 2960s and they work like a charm. I configured RADIUS access on them and had no problems with that.
    Now I have two C300 (SG300-28) and I can't get them to work with my RADIUS server, I always get an "authentication failed".
    Here are the commands on one of the boxes:
    encrypted radius-server key <encrypted key>
    radius-server host <radius host IP> auth-port 1645 acct-port 1646
    aaa authentication enable SSH radius enable
    aaa authentication login SSH radius local
    Also, why is it presenting me the login twice when I connect via ssh (first with "login-as:" and no password and then with "User Name:" and with a password?!) ? At the first login I can type whatever I want and only the second login is the real one.
    Greetings
    Martin

    i have an sg300-28 using radius for auth too.  i am able to ssh to the device with no issue using my id.  make sure your radius server is sending back the authorization string that is expected (i imagine it is doing so, since your 29xx's are working).
    below is the auth config i have for my switch.  telnet is shut off, http is shut off, https, ssh and snmp are turned on.  only radius is allowed when using ssh or https.  console is radius or local.
    encrypted radius-server key <<>>
    radius-server host 192.168.25.1 source 0.0.0.0
    radius-server host 192.168.50.1 source 0.0.0.0
    logging host 192.168.25.1
    aaa authentication enable Console radius enable
    aaa authentication enable SSH radius
    aaa authentication enable Telnet radius
    ip http authentication aaa login-authentication radius
    aaa authentication login Console radius local
    aaa authentication login SSH radius
    aaa authentication login Telnet radius
    aaa authentication dot1x default radius
    aaa accounting dot1x start-stop group radius
    aaa accounting login start-stop group radius
    line telnet
    login authentication Telnet                          
    enable authentication Telnet
    password <<>> encrypted
    exit
    line ssh
    login authentication SSH
    enable authentication SSH
    password <<>> encrypted
    exit
    line console
    login authentication Console
    enable authentication Console
    password <<>> encrypted
    exit

  • Making an Exam: Login

    Hey everyone! I am new at this and I wanted some help with a couple of things. So I tried to make an exam and I came up with a few issues. The exam is located here: http://ehsa.net76.net/dntests/adminexam2.php .
    One problem is that I don't know how to make the login and input usernames and passwords. How do I make the Start Exam button work so when an appropriate username and password are entered it takes you to the test.
    Thanks so much!

    in flash you would use something like:
    function loginF():void{
    var urlRequest:URLRequest = new URLRequest(login.php);
    var urlVar:URLVariables = new URLVariables();
    urlVar.username = username_tf.text;
    urlVar.password = password_tf.text;
    urlRequest.method = URLRequestMethod.POST;
    urlRequest.data = urlVar;
    var urlLoader:URLLoader = new URLLoader(urlRequest);
    urlLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
    urlLoader.addEventListener(Event.COMPLETE,loginCompleteF);
    function loginCompleteF(e:Event):void{
    if(e.target.data.login){//do whatever.  login valid
    } else {
    // invalid login try.
    and in your login.php you open your sqlconnection to your database, select your database,  parse the posted variables and check if the username/password match a database entry.  something like:
    <?php
    $dbServer="yourserver.com";
    $dbUsername="yourusername";
    $dbPass="yourdatabasepassword";
    $tableName = "Users";
    mysql_connect($dbServer, $dbUsername, $dbPass) or die(mysql_error());
    mysql_select_db($dbName) or die(mysql_error());
    foreach ($_POST as $key => $value) {
    $$key = $value;
    $$key = mysql_real_escape_string($$key);
    $result = mysql_query("SELECT * FROM " .$tableName. " WHERE username = '" .$username. "' AND password = '" .$password. "'") or die(mysql_error()); 
    $echoS = "false";
    while($row = mysql_fetch_array($result)){
    $echoS ="true";
    echo "login=".$echoS;
    mysql_close();
    ?>

Maybe you are looking for