05-15-2009
I want to read from the unix file....which would act as a database... so it will authenticate the username and password of user....so will it work or not...I would check it....So you returned a string "found"....please tell me how to call the next page after login authentication....
Please tell me what NF stands for and How I can grep the string after "=" sign.....
i.e. name= rohit
Thanks...
Regards,
Ravi
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
is there any way to compare two grep commands in an if statement? like:
if grep blah = grep blah blah
then
is there a way to store the values of the greps and compare them? the greps are counting pattern matches in two different files and i need to make sure they match. (7 Replies)
Discussion started by: k@ssidy
7 Replies
2. UNIX for Dummies Questions & Answers
Using the bash shell I am trying to read in 2 files. The first file (file1) is a list of names to search for in (file2). If a name in file1 is found in file2 I want the entire line in file2 to be printed to an output file. File1 consists of a single column of names. File2 consists of several... (2 Replies)
Discussion started by: lanna001
2 Replies
3. AIX
I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please... (1 Reply)
Discussion started by: achu
1 Replies
4. AIX
I want to read a log file from a particular location.In the log file each line starts with timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file... (1 Reply)
Discussion started by: achu
1 Replies
5. UNIX for Dummies Questions & Answers
Hi, I'm not sure if this is the right place but I'm a newb so it seemed right. I'm trying to write some code to organize JPEGs. Its a long story, but essentially, I need the program to tell me whether a particular jpeg is of 1) a sheet of paper (lets say its solid pink that takes up the entire... (3 Replies)
Discussion started by: Bengel
3 Replies
6. Shell Programming and Scripting
I have four files, I need to compare these files together.
As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes.
Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies
7. Shell Programming and Scripting
If ($argv == “-debug”) then
Echo “in loop”
Endif
But this is not working. If I modify this code and remove “-“, then it works.
Similarly I am getting problem using grep command also
Grep “-debug” Filename
Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies
8. Shell Programming and Scripting
Hi All,
Need help on this
I have 2 files
one file file1 which has several entries as :
define service{
hostgroup_name !host1,!host5,!host6,.*
service_description check_nrpe
}
define service{
hostgroup_name !host2,!host4,!host6,.*
service_description check_opt
}
another... (2 Replies)
Discussion started by: namitai
2 Replies
9. Shell Programming and Scripting
Hi dear users,
I need to compare numeric columns in two files. These files have the following structure.
K.txt (4 columns)
A001 chr21 9805831 9846011
A002 chr21 9806202 9846263
A003 chr21 9887188 9988593
A003 chr21 9887188 ... (2 Replies)
Discussion started by: jcvivar
2 Replies
10. UNIX for Dummies Questions & Answers
Hi guys, looking for some help with a way to compare data in two files but with some conditions.
example,
File 1 consists of
site1,10.1.1.1
site2,20.2.2.2
site3,30.3.3.3
File 2 contains
site1,l0.1.1.1
site2,50.1.1.1
site3,30.3.3.3
site4,40.1.1.1
I want to be able to match the... (1 Reply)
Discussion started by: mutley2202
1 Replies
LEARN ABOUT DEBIAN
authen::krb5::simple
Authen::Krb5::Simple(3pm) User Contributed Perl Documentation Authen::Krb5::Simple(3pm)
NAME
Authen::Krb5::Simple - Basic user authentication using Kerberos 5
SYNOPSIS
use Authen::Krb5::Simple;
# Create a new Authen::Krb5::Simple object using
# the system default realm.
#
my $krb = Authen::Krb5::Simple->new();
# Authenticate a user.
#
my $authen = $krb->authenticate($user, $password);
unless($authen) {
my $errmsg = $krb->errstr();
die "User: $user authentication failed: $errmsg
";
}
# Get the current default realm.
#
my $realm = $krb->realm();
# Set the current realm
#
$krb->realm('MY.NEW.REALM');
# Create a new object pointing to another realm.
#
my $alt_krb = Authen::Krb5::Simple->new(realm => 'OTHER.REALM');
...
DESCRIPTION
The "Authen::Krb5::Simple" module provides a means to authenticate a user/password using Kerberos 5 protocol. The module's authenticate
function takes a username (or user@kerberos_realm) and a password, and authenticates that user using the local Kerberos 5 installation. It
was initially created to allow perl scripts to perform authentication against a Microsoft Active Directory (AD) server configured to accept
Kerberos client requests.
It is important to note: This module only performs simple authentication. It does not get, grant, use, or retain any kerberos tickets. It
will check user credentials against the Kerberos server (as configured on the local system) each time the authenticate method is called.
CONSTRUCTOR
new
The new method creates the Authen::Krb5::Simple object. It can take an optional argument hash. At present the only recognized
argument is "realm".
If no realm is specified, the default realm for the local host will be assumed. Once set, the specified realm will be used for all
subsequent authentication calls. The realm can be changed using the realm function (see below).
Examples:
Using the default realm:
my $krb = Authen::Krb5::Simple->new();
specifying a realm:
my $krb = Authen::Krb5::Simple->new(realm => 'another.realm.net');
METHODS
authenticate($user[@realm], $password)
the authenticate method takes the user (or user@realm) and a password, and uses kerberos 5 (the local systems installation) to
authenticate the user.
if the user/password is good, authenticate will return a true value. Otherwise, a false value is returned and the error code is stored
in the object.
if($krb->authenticate($user, $pw)) {
print "$user authentication successful
";
} else {
print "$user authentication failed: ", $krb->errstr(), "
";
}
realm( )
realm(NEW.REALM)
The realm method is used to set or get the current default realm. If an argument is passed to this method, the default realm is set to
that value. If no argument is supplied, the current realm is returned.
errstr
The errstr method will return the error message from the most recent authentication call.
errcode
The errstr method will return the krb5 error code from the most recent authentication call. This value will not be very useful. Use
the errstr method to get a meaningful error message.
BUGS
This version of Authen::Krb5::Simple does not support null or empty passwords. If you pass an undefined value or empty string ('') as a
password, authenticate return false and set the error to indicate that null or empty passwords are not supported.
AUTHOR
Damien S. Stuart, <dstuart@dstuart.org>
SEE ALSO
perl, Kerberos5 documentation.
perl v5.14.2 2012-01-08 Authen::Krb5::Simple(3pm)