Hi all,
I tried searching for similar threads. Couldn't get any for Expect scripting.
I am trying automate a task which requires login to a machine. The user
would be prompted for the password. Now, I want this input to be hidden
from being displayed on the screen.
Is there... (1 Reply)
Hi,
I have an expect script that logs into a host (via ssh) requests the hostid then exits... I am happy with that.
However how can I run the same script in a kind of 'while read line' and enter lots of hosts? My knowledge is still very limited (as you will soon see) so any other ideas would... (2 Replies)
Hello,
I am trying to write an expect script that will ssh into a large number of Cisco routers and add some commands via the cli. The script I wrote works great for one host however I have over 350 routers that this needs to be added to. The problem is I cannot get the script to read the file of... (1 Reply)
Hello to all...this is my first post (so please go easy). :)
I feel pretty solid at expect scripting, but I'm running into an issue that I'm not able to wrap my head around. I wrote a script that is a little advanced for logging into a remote Linux machine and changing text in a file using sed.... (2 Replies)
This Expect script provides expect with a list of IP addresses to Cisco IPS sensors and commands to configure Cisco IPS sensors. The user, password, IP addresses, prompt regex, etc. have been anonymized. In general this script will log into the sensors and send commands successfully but there are... (1 Reply)
I want a shell script to call an expect script but I want the expect script to run in the background so the user is not bothered with what is going on. Is there any way to do this?
---------- Post updated at 08:23 PM ---------- Previous update was at 07:39 PM ----------
got it it was
... (1 Reply)
Hi
I would like to know how to handle my script that expects an input when calling the script and the user doesn't enter anything, I need to re-direct to my helpfile.
Bascically here is my script:
#!/bin/bash
csvdir="/var/local/dsx/csv/general"
csvfile="$csvdir/$csvfile"... (3 Replies)
Hi,
Am very new to expect scripting..
Can You please suggest me how to call an expect script inside another expect script..
I tried with
spawn /usr/bin/ksh
send "expect main.exp\r"
expect $root_prompt
and
spawn /usr/bin/ksh
send "main.exp\r"
expect $root_prompt
Both... (1 Reply)
I have an expect script called remote that I want to call from inside my expect script called sudoers.push, here is the code that is causing me issues:
set REMOTE "/root/scripts/remote"
...
log_user 1
send_user "Executing remote script as $user...\n"
send_user "Command to execute is: $REMOTE... (1 Reply)
I'm fairly new to scripting so this might not be possible.
I am using Expect with Cisco switches and need to capture the string after finding the expect request. For example, when I issue "show version" on a Nexus switch, I'm looking to capture the current firmware version:
#show version
... (0 Replies)
Discussion started by: IBGaryA
0 Replies
LEARN ABOUT NETBSD
krb5_get_krb_admin_hst
KRB5_GET_KRBHST(3) BSD Library Functions Manual KRB5_GET_KRBHST(3)NAME
krb5_get_krbhst, krb5_get_krb_admin_hst, krb5_get_krb_changepw_hst, krb5_get_krb524hst, krb5_free_krbhst -- lookup Kerberos KDC hosts
LIBRARY
Kerberos 5 Library (libkrb5, -lkrb5)
SYNOPSIS
#include <krb5/krb5.h>
krb5_error_code
krb5_get_krbhst(krb5_context context, const krb5_realm *realm, char ***hostlist);
krb5_error_code
krb5_get_krb_admin_hst(krb5_context context, const krb5_realm *realm, char ***hostlist);
krb5_error_code
krb5_get_krb_changepw_hst(krb5_context context, const krb5_realm *realm, char ***hostlist);
krb5_error_code
krb5_get_krb524hst(krb5_context context, const krb5_realm *realm, char ***hostlist);
krb5_error_code
krb5_free_krbhst(krb5_context context, char **hostlist);
DESCRIPTION
These functions implement the old API to get a list of Kerberos hosts, and are thus similar to the krb5_krbhst_init() functions. However,
since these functions returns all hosts in one go, they potentially have to do more lookups than necessary. These functions remain for com-
patibility reasons.
After a call to one of these functions, hostlist is a NULL terminated list of strings, pointing to the requested Kerberos hosts. These should
be freed with krb5_free_krbhst() when done with.
EXAMPLES
The following code will print the KDCs of the realm ``MY.REALM''.
char **hosts, **p;
krb5_get_krbhst(context, "MY.REALM", &hosts);
for(p = hosts; *p; p++)
printf("%s
", *p);
krb5_free_krbhst(context, hosts);
SEE ALSO krb5_krbhst_init(3)BSD April 24, 2005 BSD