Sponsored Content
Full Discussion: expect script in cron
Top Forums Shell Programming and Scripting expect script in cron Post 34649 by Deepa on Tuesday 4th of March 2003 01:02:31 AM
Old 03-04-2003
Yes Livinfree

I tried using the absolute path of mkpasswd...and I get the following error:

/usr/local/bin/mkpasswd: expect: not found
while executing
"exec /usr/local/bin/mkpasswd -d 2 -l 6 -s 0 -C 0"
invoked from within
"set NEWPASSWD [exec /usr/local/bin/mkpasswd -d 2 -l 6 -s 0 -C 0]"


I get this problem only when I execute the script as a cron job....from a command prompt, it works fine.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

expect and cron

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)
Discussion started by: rein
0 Replies

2. Shell Programming and Scripting

strange expect script behavior, or am i misunderstanding expect scripting?

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)
Discussion started by: v1k0d3n
2 Replies

3. Shell Programming and Scripting

calling expect script in ksh is failing via cron

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)
Discussion started by: bhatia
2 Replies

4. Solaris

expect package is not invoked from cron

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)
Discussion started by: megh
1 Replies

5. Shell Programming and Scripting

Need help with Expect script for Cisco IPS Sensors, Expect sleep and quoting

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)
Discussion started by: genewolfe
1 Replies

6. Shell Programming and Scripting

Using expect script with AIX's SMIT in cron

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)
Discussion started by: Mariognarly
0 Replies

7. Shell Programming and Scripting

expect script not running in cron "Urgent"

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)
Discussion started by: ganga39
2 Replies

8. Shell Programming and Scripting

Expect Script not running from cron. Full Paths used

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)
Discussion started by: popeye
3 Replies

9. Programming

Expect script returning string following a found expect.

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

10. Shell Programming and Scripting

Expect script not executing via cron

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
mkpasswd(8)						      System Manager's Manual						       mkpasswd(8)

Name
       mkpasswd - generate hashed password table

Syntax
       /etc/mkpasswd [-uv] passwdfile

Description
       The command is used to generate the hashed password database used by the library routines and

       If  the -u option is present the hashed files will not be built unless they already exist.  In any case, the hashed files will not be built
       if the time of last modification of the passwdfile is less recent than that of an existing hashed files.

       If the -v option is supplied, each entry will be listed as it is added.

       The file passwdfile is usually and must be in the format of The command will generate  database	files  named  passwdfile.pag  and  passwd-
       file.dir.   The command will exit with a non-zero exit code if any errors are detected.	Otherwise it will print the number of entries pro-
       cessed and the length of the longest entry.

       The presence of the hashed files is optional. They are not required for correct operation of or but will improve their performance on  sys-
       tems with moderate to large sized files.

Diagnostics
       The data base is already up to date.
       If the specified file has been modified less recently than the hashed files.

       Database not created.
       When used with the -u option and the database does not already exist.

Files
       passwdfile.dir Database filename

       passwdfile.pag Database filename

See Also
       getpwent(3), passwd(5), vipw(8)

																       mkpasswd(8)
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy