How to give password at run time in a shell script?
hi,
how can i pass a password automatically when a shell script is running.
i have shell script(runscript.sh) which call another shell script inside it as a different user.
runscript.sh contains
but when i execute "runscript.sh" it try to run main_script.sh and prompts for a password. so i have to give the password manually. is there a way so that the script automatically reads a password? or is there a way so it doesnot prompt for a password at all?
I want to write an sftp script, but I can't put ssh keys on my destination. Is it possible to pass sftp a password inside a script? I know that the -b option makes sftp use a file for params. Can the password go in such a file? How can I do this? Thanks in advance (3 Replies)
Shell script to find the run time based on log entries?
Below is the log files content updated when the script test.sh runs. I would like to calculte the difference between first update time stamp and last update time stamp to find the run time of the script. The below log file shows the first... (1 Reply)
Hi all,
I am a newbie.....am jus trying to connect to oracle thro a script, but not thro giving the username/password@server_name directly like
`$ORACLE_HOME/bin/sqlplus username/password@server_name
In the above line, once it is connected to Oracle, it shud ask me the username and password... (4 Replies)
Hi,
I am not able to give the password in Unix script for SFTP connection.
When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script.
sftp -v user@xyz.com.
... (4 Replies)
Hi Expert,
I have a .sh script in my home/new_dir/script.sh
This script creates number of output files at home/new_dir/email, home/new_dir/logs dir.
I am running this script using crontab (owner root).
Now this output files are getting created with
rw-r----- 1 root root
So if i... (2 Replies)
Hi
I'm copying around 20 vi files from solaris server-A to server-B using 'scp' command.I have included all 20 scp commands in one shell script. Proplem is, while executing each scp command its prompting for my NIS password of server A. Please see below
How to get rid of password prompt.??? (1 Reply)
Hi,
Can anyone tell me how to pass password in a shell script for sftp so that i can run it in background without user entering the password?
I used a expect script but it timesout after some time and the process remains incomplete at the end.
Can anyone suggest any other idea?
Will the... (3 Replies)
We have 15 servers. Hostnames for these 15 servers are stored in a text files and loop through each server to connect to the remote server and run a command, but this loop process runs the command one after another. However, the requirement is to run the same command on all 15 servers at the same... (10 Replies)
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Hi All,
Would like to write a Script which will run between 11am to 3 pm and send the results to output.txt.
Please suggest. (2 Replies)
Discussion started by: vasuvv
2 Replies
LEARN ABOUT OSF1
dxchpwd
dxchpwd(1X)dxchpwd(1X)NAME
dxchpwd - Create or change password program
SYNOPSIS
dxchpwd
dxchpwd -r | -l
dxchpwd [-r | -l] -q
dxchpwd [-r | -l] -u username
OPTIONS
If dxchpwd is invoked without any options, it is assumed that the current user's password is to be changed. The following options are also
accepted: Tells dxchpwd that the password change is to be done for a Local user. This can be combined with the -u and -q options. Tells
dxchpwd that the password change is to be done for a NIS user. This can only be done from a NIS master and can be combined with the -u and
-q options. Tells dxchpwd to query the user for the user name of the account whose password is to be changed. Tells dxchpwd to change
this user's password.
DESCRIPTION
The dxchpwd command lets you change your password. When you invoke the dxchpwd 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 authorization database for the user whose password is being changed.
If your system is running with enhanced security, you may have to choose a password from a list of randomly generated passwords or you may
be prohibited from changing your password until its minimum lifetime has expired, as specified in the authorization database.
EXAMPLES
The following example requests that the password be changed for user smith: dxchpwd -u smith
FILES
Password file Protected Password Database dxchpwd executable
SEE ALSO X(1X), xdm(1X), passwd(1)dxchpwd(1X)