02-27-2008
Supply Password Thru Script
Hello,
I am using AIX 5 and one of the application does certain db updation daily and runs few script. One script among them calls another program, which in turn asks for a user Id and password. Is there anyway to use 'expect' of something similar on AIX so that while calling that program of userid and password - its get passed automatically and no interaction could take place.
1) Please let me know what piece of code can I merge into my existing script to automate it?
2) IF expect works on AIX, i dont see it in /usr/bin - where to find that?
Please help!
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a java program that runs on a unix server that prompts the user for input and provides a default value to the user.
So it does something like this:
Enter source server name <source_server_name>:
Enter target server name <target_server_name>:
I just hit enter to take the default... (1 Reply)
Discussion started by: progkcp
1 Replies
2. Shell Programming and Scripting
Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.
which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies
3. Red Hat
Hello guys:
I'm a beginner in this exciting world of open spource and linux. I'm working as a support engineer and a customer send back to me a sysreport from his system running redhat 4. the customer has a power supply failed in his server and to see it and justify the replacement I required a... (0 Replies)
Discussion started by: amani
0 Replies
4. UNIX for Advanced & Expert Users
for i in $var; do
for j in $var; do
if
then
ssh -x -a "$host_login_name"@${i} ping -c 3 -s 3 ${j}
if
then
printf "Success\n"
else
printf "Failed\n"
fi
fi
done
done
Enter your box login... (2 Replies)
Discussion started by: happyrain
2 Replies
5. Shell Programming and Scripting
Hi,
I am trying to supply password to scp with out having manual interaction. Like, store the password in a variable and it should be supplied to the scp when it prompted for the password. Is there any other way than the user authentication and using "expect" in perl script. i.e is this... (3 Replies)
Discussion started by: pc_raghu
3 Replies
6. AIX
Hi,
As in Management Modules of IBM it is possible to find out wheather out of dual powersupply , if one goes down.
is it possible to find out in HMC to find out if one power supply goes down of P Series server? if server is remotely
HOw to find out if one power supply of server is down?... (1 Reply)
Discussion started by: manoj.solaris
1 Replies
7. Shell Programming and Scripting
Hi,
I have something like below code piece in ksh
while read machine
do
ssh $user@$machine < steps.ksh $RPI
done < $machine
here, after it gets logged in to server it is not considering the $PRI as argument for steps.ksh script
please suggest the fix. (1 Reply)
Discussion started by: rbalaj16
1 Replies
8. Solaris
Hi folks,
I encountered this alarms on a solaris server:
04/21/12 23:17:55 MNP-PGW-A_bge3 mnp 231748 Power Supply Unit 0 is faulty
04/21/12 23:17:55 MNP-PGW-A_bge3 mnp 231748 Power Supply Unit 1 is faulty
04/21/12 23:18:26 MNP-PGW-A_bge3 mnp 231822 Power Supply Unit 0 is faulty:CLEAR... (0 Replies)
Discussion started by: kimurayuki
0 Replies
9. Shell Programming and Scripting
I would like to write a bash shell script which will connect to remote server using passphrase. (I have public-private infrastructure created, and as per instruction, I must not use password less ssh).
This particular script will be fired from cron.
Can you please advice how I can supply the... (2 Replies)
Discussion started by: atanubanerji
2 Replies
LEARN ABOUT ULTRIX
passwd
passwd(1) General Commands Manual passwd(1)
Name
passwd - create or change password
Syntax
passwd [-aefs] [name]
Description
The command lets you or the superuser change your password. When you enter the command, the program prompts you for the old password and
then for the new password. Next, the program asks you for the new password again, to verify that you have typed it correctly. Note that
the passwords are not displayed on the screen.
Your new password must meet the length requirements specified by the superuser. To review these requirements, refer to the file. (This is
a read-only file.)
If your system is running with increased security, you may have to choose a password from a list of randomly generated passwords, or you
may need authorization to change your password. At higher security levels, you may be prohibited from changing your password until its
minimum lifetime has expired, as specified in the Authorization Database.
If you are running the BIND/Hesiod service, your password will be updated automatically on the server.
Options
-a Supply a list of randomly generated passwords. (See the Examples section.)
-e Use an extended protocol when communicating with a prompter program. As a result, the standard input and output (used by is sent to
this program.
-f Change the finger information, not the password. The finger program provides information about current ULTRIX users, such as login and
terminal name, idle time and office location.
-s Change the login shell of the password file, not the password entry.
Restrictions
If you use a hardcopy terminal, you must destroy all print outs of valid passwords.
Examples
The following example illustrates the -a option, which displays a list of randomly generated passwords and their suggested pronunciation
with hyphens. The hyphens delineate the syllables of the passwords:
passwd -a abcd
Changing password for abcd
Here are some suggested passwords:
ryegd ryeg-di
aswurku a-swurk-u
ryedok ryed-ok
teleccs tel-ec-cos
wahislas wa-hi-slas
Enter new password:
Diagnostics
Password must be at least 6 characters long, password unchanged
Your password does not meet the minimum length requirement specified in
Warning: Only the first 8 characters of the password are significant
Your password exceeds the maximum length requirement specified in
Permission denied
You do not have the privilege to change your password. The minimum lifetime has not expired.
Password is not different enough, unchanged
Your new password must be different from your old password.
Password must be different than logname, and not resemble previous password
Your new password must be different from your login name.
Verification failed, password unchanged
You misspelled the verification of your new password.
Files
Password file
Authorization data base directory
Authorization data base page
Data base service selection and security configuration file
Only the superuser and members of the group can access the and files.
See Also
chfn(1), chsh(1), finger(1), login(1), shexp(1), yppasswd(1yp), passwd(5yp), edauth(8), vipw(8)
Guide to System Environment Setup
Security Guide for Users
Security Guide for Administrators
"Password Security: A Case History", Supplementary Documents, Volume 3: System Manager
passwd(1)