Hi ,
I have installed expect on the server and I am trying to execute the script but getting below error.Please suggest me the way out.
I would like to know how cct can be utilized here to call extlog.exp?
Code:
./passwdchng.sh
Enter your password:
password
dbaguest,192.168.175.1,password
./passwdchng.sh: logext.exp: command not found
oracle,192.168.175.2,password
./passwdchng.sh: logext.exp: command not found
root,192.168.175.3,password
./passwdchng.sh: logext.exp: command not found
Sripts are:--
#!/bin/bash
Code:
username="dbaguest"
echo "Enter your password:"
read newPassword
cat ssh.csv | while read line;
do
host=`echo $line | cut -d, -f1`
addr=`echo $line | cut -d, -f2`
paswd=`echo $line | cut -d, -f3`
echo "$host,$addr,$paswd"
cct=$(logext.exp $paswd $newPassword $addr $username)if [[ "$cct" == *login* ]]; then
echo "SSH Connection to $host succeeded" >> testlog
if [[ "$cct" == *successfully* ]]; then
echo "Password has been changed successfully for $host" >> testlog
else
echo "Password change failed for $host." >> testlog
echo "$host,$addr,$paswd" >> errorlog
fi
else [[ "$cct" == *Permission* ]]
echo "$host,$addr,$paswd" >> errorlog
fi
cct=""
done
Hi
How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Hi all,
I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first.
Can you please help me determine which one to... (14 Replies)
I just upgraded to Android 2.2 from 2.1. The GPS issue that was troublesome in 2.1 seems to have been fixed. Some of web browsing seems faster, but it could just be my connection is better today ;) Flash works in some browsers but not very good and it is too slow for Flash apps designed for... (0 Replies)
Gents,
I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Hey I have a data in the file named as outputFile.txt. The data is in the format
123456,12345678912345,400,09/09/09,INACTIVE.
I want this output without commas ie
12345612345678912345400090909INACTIVE.
Please tell me what to do and clear explain all the terms, as I am new to it. (6 Replies)
Hi, if in a network there are lots of PCs connected with either windows or linux as operating system.Then what will be the shell script for the same and also if the PC has linux in it then we have to find if it is occupied or unoccupied.
If the PC has windows in it then we have to find if it is... (6 Replies)
Hi there
please have a look at the code..i want to create Using a named pipe. Run a find in the background starting in the working directory
While this is happening wait for input from the user to ask him which file to find.
If the user does not enter any data in 10 seconds ask the user again.... (1 Reply)
asadmin-list-persistence-resources(1AS) User Commands asadmin-list-persistence-resources(1AS)NAME
asadmin-list-persistence-resources, list-persistence-resources - gets all the persistence resources
SYNOPSIS
list-persistence-resources --user admin_user [--password admin_password] [--host localhost][--port 4848] [--secure|-s] [--passwordfile
filename][--terse=false] [--echo=false] [--interactive=true]
Gets all the persistence resources. This command is supported in remote mode only.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
--interactive if set to true (default), only the required password options are prompted.
Example 1: using list-persistence-resources
asadmin> list-persistence-resources --user admin1
--password adminadmin1 --host pigeon --port 5001
Command list-persistence-resources executed successfully
Where: sample_persistence_resource is the persistence resource listed.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-create-persistence-resource(1AS), asadmin-delete-persistence-resource(1)J2EE 1.4 SDK March 2004 asadmin-list-persistence-resources(1AS)