Sponsored Content
Top Forums Shell Programming and Scripting Run expect script in systems that don't support it out of box Post 302070554 by namityadav on Wednesday 5th of April 2006 05:53:10 PM
Old 04-05-2006
The very commonly asked .. but unanswered requirement for a password change script

Noob question ..

My Java based application needs to change some user passwords based on some user actions. Since this application can run on Redhat AS2.1 / AS4.0 / Solaris 9 etc, the most safe and portable solution that I could think of was: Use expect.

Now, expect is not available on all platforms, and I don't want to install tcl / tk / expect to be able to run my application. So, what's the simplest way for me to achieve what I want to?

Keep a expect binary and required libraries in a local directory in the application? How can I do this? Any other ideas

Last edited by namityadav; 04-19-2006 at 09:11 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to run shell script inside expect script?

I have the code like this : shell script continues ... .... expect -c" spawn telnet $ip expect "login:" send \"$usrname\r\" expect "Password:" send \"$passwd\r\" expect "*\>" send \"$cmdstr\r\" ... (1 Reply)
Discussion started by: robbiezr
1 Replies

2. Programming

Expect script to run a Shell script on remote server

Hi All, I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands. spawn ssh $uid@$host expect "password:" send "$password\r" expect "*\r" send... (2 Replies)
Discussion started by: yashwanthsn
2 Replies

3. Shell Programming and Scripting

EXPECT script for Telnet automation. Need your support.

Dear experts, please help me . I've found simple EXPECT scripts and all works fine. But I need more automation in error handling and sending list of commands/output logging from multiple remote hosts. I have 10 hosts, for example: host1 192.168.1.1 LOGIN1 PASSWORD1 ...... ... (2 Replies)
Discussion started by: starchen
2 Replies

4. Shell Programming and Scripting

Use expect to run an interactive shell script?

Hi all, I have a bit of a vexing issue here and I'm not certain how best to go about it. Basically, I want to run a shell script and automate the user prompt of hitting 1 to fully uninstall Symantec Anti-Virus for OS X. Would expect be the best way to do this? (5 Replies)
Discussion started by: prometheon123
5 Replies

5. Shell Programming and Scripting

Cannot get this bash/expect script to run under a crontab

#!/bin/bash # # RAP configuration script # # Usage: ./rap.sh # # Requires: expect, tcl # # Script expects to find a file called rap.csv located in the same directory as the script. If the file is placed # in a different directory, modify the custom entries section to specify the absolute... (8 Replies)
Discussion started by: mrkool
8 Replies

6. UNIX for Advanced & Expert Users

Unable to run the script on remote machine Using Expect script

Not able to execute the file in remote host using except utility I am automating the SFTP keys setp process: So i created the expect script for controlling the output of shell below is my main code: Code: #!/usr/bin/expect set fd set password close $fd set df set app close $df... (1 Reply)
Discussion started by: Manoj Bajpai
1 Replies

7. Shell Programming and Scripting

Notify when the script run(hourly)on my jump-box only when there is a failure on my remote-box

Team, Presently I have a script, which i have set up cron on one of my Jump-boxes,and gives me the output on every hourly basis,fetching the data from the remote machine.Basically it gives me the list of all active users logged and its count once we execute the script.Here the count is... (6 Replies)
Discussion started by: whizkidash
6 Replies

8. Shell Programming and Scripting

Script to Run Multiple Systems Checks and mail me the results after every reboot- Linux

Hello, I'm trying to create a mechanism wherein a set of Production servers will email me the results of system checks like Uptime, NFS Mounts and a Process after every scheduled reboot. For this, I figured I'd use the @reboot parameter that crond comes with. I have added the below onliner... (3 Replies)
Discussion started by: pocodot
3 Replies

9. Shell Programming and Scripting

In the script I get additional file, which I don't expect do get

I have the following script #!/bin/sh Usage () { echo "Usage: $0 <config_file>" echo "Example: ./sftp_ondemand_daily.sh /export/data/mbsesb/config/ond emand.cfg /export/data/mbsesb/config/filename.lst" exit 1 } if then Usage fi ... (6 Replies)
Discussion started by: digioleg54
6 Replies

10. Shell Programming and Scripting

A shell script to run a script which don't get terminated and send a pattern from the output by mail

Hi Guys, I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
BACKUPNINJA(1)							backupninja package						    BACKUPNINJA(1)

NAME
BACKUPNINJA - A lightweight, extensible meta-backup system "a silent flower blossom death strike to lost data." SYNOPSIS
backupninja [ -h ] [ -d ] [ -n ] [ -t ] [ -f filename ] [ --run filename ] DESCRIPTION
Backupninja allows you to coordinate system backups by dropping a few simple configuration files into /etc/backup.d/. Most programs you might use for making backups don't have their own configuration file format. Backupninja provides a centralized way to configure and coor- dinate many different backup utilities. FEATURES
- easy to read ini style configuration files. - you can drop in scripts to handle new types of backups. - backup actions can be scheduled. - you can choose when status report emails are mailed to you (always, on warning, on error, never). - console-based wizard (ninjahelper) makes it easy to create backup action configuration files. - passwords are never sent via the command line to helper programs. - in order to backup a db or sql database, you cannot simply copy database files. backupninja helps you safely export the data to a format which you can backup. - works with Linux-Vservers. Backup types include: - secure, remote, incremental filesytem backup (via rdiff-backup). incremental data is compressed. permissions are retained even with an unpriviledged backup user. - basic system and hardware information. - encrypted remote backups (via duplicity). - safe backup of MySQL, PostgreSQL, OpenLDAP, and subversion databases. - burn CD/DVDs or create ISOs. OPTIONS
-h, --help Show summary of options -d, --debug Run in debug mode, where all log messages are output to the current shell. -f, --conffile CONF_FILE Use CONF_FILE for the main configuration instead of /etc/backupninja.conf -t, --test Run in test mode, no actions are actually taken. -n, --now Perform actions now, instead of when they might be scheduled. --run ACTION_FILE Runs the action configuration ACTION_FILE and exits. CONFIGURATION
General settings are configured in /etc/backupninja.conf. In this file you can set the log level and change the default directory loca- tions. See backupninja.conf(5). To preform the actual backup actions, backupninja processes each action configuration file in /etc/backup.d according to the file's suffix. See backup.d(5). EXAMPLE USAGE
Backupninja can be used to implement whatever backup strategy you choose. It is intended, however, to be used like so: First, databases are safely copied or exported to /var/backups. Often, you cannot make a file backup of a database while it is in use, hence the need to use special tools to make a safe copy or export into /var/backups. Then, vital parts of the file system, including /var/backups, are nightly pushed to a remote, off-site, hard disk (using rdiff-backup). The local user is root, but the remote user is not privileged. Hopefully, the remote filesystem is encrypted. In order for this to work (ie for diff-backup to run unattended), you must create ssh keys on the source server and copy the public key to the remote user's authorized keys file. For example: root@srchost# ssh-keygen -t rsa -b 4096 root@srchost# ssh-copy-id -i /root/.ssh/id_dsa.pub backup@desthost Now, you should be able to ssh from user 'root' on srchost to user 'backup' on desthost without specifying a password. When prompted for a password by ssh-keygen, just leave it blank by hitting return. The "wizard" ninjahelper(1) will walk you through these steps. FILES
/usr/sbin/backupninja main script /etc/backupninja.conf main configuration file; general options /etc/cron.d/backupninja runs main script hourly /etc/logrotate.d/backupninja rotates backupninja.log /etc/backup.d directory for configuration files /usr/share/backupninja directory for handler scripts /usr/share/doc/backupninja/examples example action configuration files. SEE ALSO
ninjahelper(1), backupninja.conf(5), backup.d(5), AUTHOR
BACKUPNINJA was written by the riseup.net collective. riseup October 10, 2005 BACKUPNINJA(1)
All times are GMT -4. The time now is 03:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy