Sponsored Content
Full Discussion: reg accepting password
Top Forums Shell Programming and Scripting reg accepting password Post 302346612 by rogerben on Sunday 23rd of August 2009 11:46:23 AM
Old 08-23-2009
reg accepting password

Hi,
I want to login to many systems and password should be taken automatically from a file(login is working but password is not accepting). Any help on this is appreciable .



My code.


for i in `cat /tmp/tes ` ====>tes file contain list of hosts
> do ssh $i
> perl prog.pl
> done


cat prog.pl =====> perl coding file
#!/usr/bin/perl
open(MYFILE,'abc.txt'); =====>abc.txt contain password which is same for all the hosts
print ("The value ");
while($value=<MYFILE>)
{
print ($value); ========> password value not printing after login
}
rogerben
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Accepting User Input

I'm just starting out with UNIX and have figured some stuff out. I just need some help with accepting user input on the command line. For instance, I created a number counter that counts down from any positive hard coded number. But, I want the commnad line line to read "Countdown 20" where 20... (1 Reply)
Discussion started by: scott78
1 Replies

2. HP-UX

Oracle not accepting new connections

Hi UNIX guru's, Have recently upgraded Oracle from 8i to 10g on an HP-UX (RISC) 11.11 box. At least twice a day the database stops accepting incoming connections and the following errors are observed in the various logs. The box needs to be rebooted to get everything going again. The... (4 Replies)
Discussion started by: mat_cottrell
4 Replies

3. Shell Programming and Scripting

Not able to display the value I am accepting as an argument

Hi, I am new to UNIX. I am facing some problem here. #! /usr/bin/ksh currDate = $1 export currDate; echo " Date is $currDate" when I run this script, it says : currDate not found. Can anybody point out the mistake please. --mahek (3 Replies)
Discussion started by: mahek_bedi
3 Replies

4. Shell Programming and Scripting

Reg : telnet password issue

Hi All, I am working on AIX 5.3. My requirement is to telnet to a server and scp a file from another server In my shell script i am using telnet to enter to a server and i am echoing the password as below echo open $Infahost sleep 1 echo $Infaftplogin sleep 1 echo $Infaftppasswd... (3 Replies)
Discussion started by: sam99
3 Replies

5. UNIX for Dummies Questions & Answers

accepting input date

I how do i accept a input date in script which is lesser than a specified day? ex: to accept a date less than or equal to 100 days(from today).?:( Thanks for the help in advance.:) (1 Reply)
Discussion started by: abhi_123
1 Replies

6. Shell Programming and Scripting

Accepting A-Za-Z

Is there a way accept A-Za-z0-9 from the user from a parameter? EX. I want to take the parameter from the user even if its hEu or H3y and store it as a parameter ( $1 ) (18 Replies)
Discussion started by: puttster
18 Replies

7. Shell Programming and Scripting

Accepting Input regardless of Case

Hi I am trying to get my script to accept input regardless if the person enters a or A. here is the portion of the code where I get the input. echo -n 'Please enter your choice:' # prompt user for input. read reply # read input echo case $reply in #... (2 Replies)
Discussion started by: DualPandas
2 Replies

8. Shell Programming and Scripting

script accepting password

Hi friends, I am very new to Unix scripting and having some difficulty in my first shell script. I have written a simple shell script to upload an artifact to a remote machine on the network. echo "Uploading the artifact" scp app.war username@remotemochine.domainname.net:/home/deployables... (3 Replies)
Discussion started by: prashdeep
3 Replies

9. Shell Programming and Scripting

Parameter not accepting in awk

In below script parameterwhich i am passing to awk function is not working.Not sure why its not accepting parameter.Please tell me how to pass parameter to the awk function.Please check the below script. #!/bin/ksh dummy_file=/etlapps/dev/data/sub_servicer_data/ScriptLogs/emp.txt fields=5... (2 Replies)
Discussion started by: katakamvivek
2 Replies

10. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies
checkpw(8)						      System Manager's Manual							checkpw(8)

NAME
checkpw - checks password against the file ~/Maildir/.password SYNOPSIS
checkpw prog DESCRIPTION
checkpw reads descriptor 3 through end of file and then closes descriptor 3. There must be at most 512 bytes of data before end of file. The information supplied on descriptor 3 is a login name terminated by , a password terminated by , a timestamp terminated by , and possibly more data. There are no other restrictions on the form of the login name, password, and timestamp. If the password is unacceptable, checkpw exits 1. If checkpw is misused, it may instead exit 2. If there is a temporary problem checking the password, checkpw exits 111. If the password is acceptable, checkpw runs prog. prog consists of one or more arguments. Compatible tools There are other tools that offer the same interface as checkpw Note that these tools do not follow the getopt interface. Optional features are controlled through (1) the tool name and (2) environment variables. The password database checkpw checks the password against the content of the file Maildir/.password in the user's home directory corresponding to the login name. Maildir may be overidden through the environment variable $MAILDIR. Process-state changes Before invoking prog, checkpw sets up $USER, $HOME, $SHELL, its supplementary groups, its gid, its uid, and its working directory. FILES
~/Maildir/.password SEE ALSO
checkapoppw(8), qmail-popup(8), qmail-pop3d(8) AUTHOR
This manual page was written by Gerrit Pape <pape@smarden.org>, for the Debian GNU/Linux system. checkpw(8)
All times are GMT -4. The time now is 06:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy