DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Passwd authentication in perl

  1. #1
    Join Date
    Jan 2001
    Posts
    230

    Question

    Hi:

    I am learning perl. This is part of my first perl code.
    when I enter the right passwd for database then I have no problem, but if I enter the wrong passwd then process hangs (when you enter a wrong passwd at sqlplus prompt then it will ask for username and passwd again).
    What do I need to do for passwd authentication so my process does not hang.

    =========================================================
    my $USER="XYZ";
    my $PASS="";

    # Get the password
    print_tee ("$USER Password: ");
    `stty -echo`;
    $PASS=<STDIN>;
    chomp $PASS;
    `stty echo`;
    print_tee ("\n\n");
    if ($PASS eq "")
    {
    print ("\nERROR: Password may be empty. Exiting...\n\n");
    exit;
    }

    my $result = `sqlplus $USER/$PASS `

    ================================================================

    Thanks.

  2. #2
    Join Date
    Jan 2001
    Posts
    230
    Hi:

    Please let me know where can I find the information.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width