Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to pass password as a variable for sshpass authentication? Post 303034197 by MadeInGermany on Sunday 21st of April 2019 10:49:49 AM
Old 04-21-2019
Have $var in quotes: "$password"
These 2 Users Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Password Authentication

I would like to know how to validate an unix password from shell script (If is possible) Thanks very much ;) (3 Replies)
Discussion started by: juan_o_morillo
3 Replies

2. UNIX for Advanced & Expert Users

disallowing user/pass authentication in favor of a pure key system?

i finally got my key-pair system working... sort of a makeshift eToken system. however, i only want to allow this sytem for system access. i don't want to allow for the standard user/pass authentication system. right now i changed the following: # To disable tunneled clear text passwords,... (2 Replies)
Discussion started by: xyyz
2 Replies

3. UNIX for Advanced & Expert Users

AIX password authentication very slow

AIX password authentication very slow I installed and already removed openssh and our login on the aix box very slow. It takes 30 seconds to get the password authenticated. How can i debug this problem? and what might be the reason. It was working fine until i tried to get openssh... (0 Replies)
Discussion started by: progressdll
0 Replies

4. Solaris

Enhanced Password Authentication

Hello; I am moving a customer from Solaris 2.6 to Solaris 2.8. The customer has requested the following two requirements also be implemented: 1. Lock a user account out for X number of days after 3 unsuccessful login attempts. 2. No reuse of the last 5-10 passwords. Also referred to... (1 Reply)
Discussion started by: rambo15
1 Replies

5. Solaris

bypass password authentication for sftp in unix

I am using solaris unix 8.2 version. I want to bypass password authentication for sftp. Can you please give some ideas on this. thanks.Regards. (4 Replies)
Discussion started by: vijill
4 Replies

6. Solaris

can't bypass password authentication

I can able to SFTP from my web server unix to apps server unix end. but the other way from APPS server to Web server is still asking me the password. I have done same procedure both side. still i am having same problem. Any one help on this. thanks, regards (3 Replies)
Discussion started by: vijill
3 Replies

7. Shell Programming and Scripting

Password-less RSA Authentication not working

Hello Friends, I know this issue has been raised many times and hence I tried every resolution provided in the forum before I posted this issue again. My Password-less RSA authentication was working fine for quite some time. Whenever the remote server password used to change I used to re-do... (5 Replies)
Discussion started by: mehimadri
5 Replies

8. Solaris

Unable to login password less authentication

Hi, I am facing strange problem in solaris 10. My requirement is that on server A using user test, any user which is created on Server B will be able to login wihtout password (ssh) from Server A All the users which are on Server B are able able to login from Server A using test user. ... (8 Replies)
Discussion started by: manoj.solaris
8 Replies

9. Red Hat

How to pass value of pwd as variable in SED to replace variable in a script file

Hi all, Hereby wish to have your advise for below: Main concept is I intend to get current directory of my script file. This script file will be copied to /etc/init.d. A string in this copy will be replaced with current directory value. Below is original script file: ... (6 Replies)
Discussion started by: cielle
6 Replies

10. UNIX for Dummies Questions & Answers

SSH Keys Authentication keeps asking for password

Hi! Im trying to set access from ServerA(SunOS) to ServerB(Some custom Linux with Keyboard Interactive login) with SSH Keys. As a proof of concept I was able to do it between 2 virtual machines. Now in my real life scenario it isnt working. I created the keys in ServerA, copied them to... (7 Replies)
Discussion started by: RedSpyder
7 Replies
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)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy