I have the following expect script, which I want to run in cron. It fails however, very likely due to the fact that there's no /dev/tty available.
set timeout 30
spawn -nottycopy -nottyinit /usr/bin/ssh $hostname $command
match_max 100000
expect "password"
send -- "$password"
send -- "\r"... (0 Replies)
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)
I'm calling an expect script via a ksh script in cron and it is failing. The script runs fine if i run it manually. Does anyone know if it is an issue with compatibilty and if there is a way around it? (2 Replies)
Hi,
I am running some etl commands in the windows from shell script(from unix sun solaris 5.9) by using expect package .While running manually the script is working fine.While running from cron it is exiting the after successfully firing the ETL command(The control does not stop after firing... (1 Reply)
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)
My searches turned up nothing relevant, so I apologize if this has already been looked at.
I am trying to run an expect script from a Solaris machine, that ssh's into an AIX machine, and interacts with a SMIT created menu system that runs a few backups for me.
The expect script runs fine when... (0 Replies)
I wrote a script to download the files from sftp location to local. while running the script manually its working fine. when i schedule the same in cron its not working.... :wall::wall:
here is the script:
#!/bin/bash
... (2 Replies)
My cron file. Copied $PATH
# Minute Hour Day of Month Month Day of Week Command
SHELL=/bin/ksh
PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/perl/lib:/perl/lib/lib/perl5:/perl/scripts:.:/perl/lib/local:/home/popeye:/temp
0... (3 Replies)
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)
Hello All,
I'm having an issue getting an expect script to run as a cron job. The script executes fin if I run it from the command line but I get nothing when trying to run it as a cron job. I've researched other forums and threads and there have been references to the environment, or lack... (16 Replies)
Discussion started by: KingT617
16 Replies
LEARN ABOUT DEBIAN
mkpasswd
MKPASSWD(1) Debian GNU/Linux MKPASSWD(1)NAME
mkpasswd - Overfeatured front end to crypt(3)SYNOPSIS
mkpasswd PASSWORD SALT
DESCRIPTION
mkpasswd encrypts the given password with the crypt(3) libc function using the given salt.
OPTIONS -S, --salt=STRING
Use the STRING as salt. It must not contain prefixes such as $1$.
-R, --rounds=NUMBER
Use NUMBER rounds. This argument is ignored if the method chosen does not support variable rounds. For the OpenBSD Blowfish method
this is the logarithm of the number of rounds.
-m, --method=TYPE
Compute the password using the TYPE method. If TYPE is help then the available methods are printed.
-5 Like --method=md5.
-P, --password-fd=NUM
Read the password from file descriptor NUM instead of using getpass(3). If the file descriptor is not connected to a tty then no
other message than the hashed password is printed on stdout.
-s, --stdin
Like --password-fd=0.
ENVIRONMENT
MKPASSWD_OPTIONS
A list of options which will be evalued before the ones specified on the command line.
BUGS
If the --stdin option is used, passwords containing some control characters may not be read correctly.
This programs suffers of a bad case of featuritis.
SEE ALSO passwd(1), passwd(5), crypt(3), getpass(3)AUTHOR
mkpasswd and this man page were written by Marco d'Itri <md@linux.it> and are licensed under the terms of the GNU General Public License,
version 2 or higher.
Marco d'Itri 21 March 2008 MKPASSWD(1)