How to use 'expect' to pass UID & Password to a "for loop" in shell script?
Friends,
Need someone's help in helping me with the below requirement for a script:
> For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details <
I know, this is possible through expect programming in a simple shell script, but unfortunately I'm not able to get one to work as required. Below is what I could manage to write without expected results:
Running the above written expect script doesn't solve my purpose - it does nothing Could someone help me rectify this script or help me with a better idea?
hi friends,
i m tryin to load data from one set of table to other i have sql procedure al ready for it..!
i m going to load the procedure only if data in one of my table for example
table "landing " have 10 records each attribute of this table is
file_name status date ... (2 Replies)
Hello All,
I am a newbie in Shell script programming, and maybe you can help me with my query.
I need to write a shell script (mntServer.ksh) that will start a background process and also to be able to run another script.
The mntServer.ksh script contains:
#!/bin/ksh... (1 Reply)
Hi,
I am trying to use "Expect" in shell script to ssh and do some work in remote server but I am unable to connect. Here is the code I am using.
#save as test.sh
set ip "10.10.10.10"
set username "uname"
set password "upass"
spawn ssh $username@$ip
expect "Password:"
send... (8 Replies)
Hi
I'm trying to run a script " abc.sh" which triggers "use.sh" .
abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script.
Please find below the scripts:
#abc.sh
#!/usr/bin/expect -f
exec /root/use.sh
expect "*name*"
send... (1 Reply)
I need a shell script using expect to login to couple of remote servers and read "crontab -l -u <username>" & "cat /etc/rc.local" & "df -h" and able to create output into a file saved locally with hostname.crontab & hostname.rc.local & disk.status. I can supply a file as list of hostname or IP... (4 Replies)
Friends,
Need someone's help in helping me with the below requirement for a script:
> For a list of servers(over 100+), I need to login into each of them(cannot configure password-less ssh) & grab few configuration details <
I know, this is possible through expect programming in a simple... (14 Replies)
Hi,
I need to run a test script to check all test accounts, is it possible to pass the password to su in following command? I've got following error:
$ echo "${password}" | su ${test_account} -c "check_account.sh"
standard in must be a tty
Thank you.
- j (3 Replies)
Ladies & Gents,
Can one of you gurus please show me a very simple "expect" script to change the password in Solaris in a script, please? Nothing fancy, no error checking, no nothing. Just to change the password of a new user, it's all.
Many thanks in advance. U guys have honestly earned my... (1 Reply)
Hi All,
i am trying to ssh to a remote machine and execute certain command to remote machine through script.
i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as
expect: spawn id exp5 not open
while executing
"expect "$" {... (3 Replies)
Jifty::Plugin::Authentication::Password::Dispatcher(3pm)User Contributed Perl DocumentatioJifty::Plugin::Authentication::Password::Dispatcher(3pm)NAME
Jifty::Plugin::Authentication::Password::Dispatcher - password plugin dispatcher
DESCRIPTION
All the dispatcher rules jifty needs to support "" in Jifty::Authentication::Password
RULES
"before logout"
Logout and return home.
See Jifty::Plugin::Authentication::Password::Action::Logout.
"before *"
Setup the navigation menu for login or logout.
"on qr/^(?:signup|lost_password)$/"
Redirect to home if logged.
Request a password reminder or signup for an account otherwise.
"on login"
Redirect to home if logged.
Show the login form otherwise.
"before reset_lost_password"
Request a password reset.
"before passwordreminder"
Request a new password reminder to be sent by email.
See Jifty::Plugin::Authentication::Password::Action::SendPasswordReminder.
"before signup"
Sign up for an account.
See Jifty::Plugin::Authentication::Password::Action::Signup.
"before login"
Login to your account.
See Jifty::Plugin::Authentication::Password::Action::Login.
not_logged_in_nav
Adds the login and signup links to the navigation menu.
logged_in_nav
Adds the logout link to the navigation menu.
SEE ALSO
Jifty::Plugin::Authentication::Password, Jifty::Plugin::Authentication::Password::View
COPYRIGHT
Jifty is Copyright 2005-2010 Best Practical Solutions, LLC. Jifty is distributed under the same terms as Perl itself.
perl v5.14.2 2010-12-10 Jifty::Plugin::Authentication::Password::Dispatcher(3pm)