Sponsored Content
Top Forums Shell Programming and Scripting How to add password prompt between script ? Post 302939382 by matrixmadhan on Wednesday 25th of March 2015 04:12:14 AM
Old 03-25-2015
Looking for something like this,

Code:
read password < /dev/tty

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sudo in OS X shell script without password prompt??

I've written a shell script to alter a particular preference file on OS X (10.3.9), which works fine (tested by running the script from the terminal sat in front of the box). Problem is, I now have to run this script remotely across a number of machines via remote desktop, so where I've used the... (1 Reply)
Discussion started by: Brad_GNET
1 Replies

2. UNIX for Advanced & Expert Users

Stopping password prompt

hi I have installed a new Linux machine and having another machine having Solaris on it. i want that when i log into my solaris machine using rlogin from Linux machine then no password prompt occurs... Thanks in advance. (4 Replies)
Discussion started by: rochitsharma
4 Replies

3. Shell Programming and Scripting

sudo, use in script without prompt for password

I need to create an automated script where I have to use sudo to switch to multiple user so the script stops and prompts for password, Is there a way I can provide the password in same command only? Remember that, I cannot disable the password settings of sudo as I dont have rights. (4 Replies)
Discussion started by: gauravgrover50
4 Replies

4. OS X (Apple)

Bash script prompt for sudo password?

I'm making a script that will be a double clickable .command file and I need it to prompt for the users admin password. So far I have: if ]; then sudo -p "Please enter your admin password: " date 2>/dev/null 1>&2 if ; then echo "You entered an invalid password... (2 Replies)
Discussion started by: PatGmac
2 Replies

5. Shell Programming and Scripting

rsync without password prompt

Hi, I am tranfering the files from local machine to remote machine using rsync utility but it is prompting password. but i don't want to provide through prompt. how can i give in my shell script. can anyone suggest me.Thanks in advance rsync -rvcpogtl -e "ssh $LOCAL_PORT" $SOURCE_DIR... (1 Reply)
Discussion started by: KiranKumarKarre
1 Replies

6. Shell Programming and Scripting

enter password at prompt during a script?

I'm using rsync with the "-e ssh" option so of course it asks for a password using a prompt. Is there a way to tell a script to expect a prompt, wait for it, and give a password when it arrives? There is a way to give rsync a password as part of its options using a file, but it only works with... (2 Replies)
Discussion started by: davidstvz
2 Replies

7. OS X (Apple)

get around rsync password prompt

Hey there, I'm trying to do a very simple rsync to back up my computer to an external drive connected via usb every night, but it keeps asking for a password. I tried using the password file flag, but it looks like that is only a daemon. Does anyone have any ideas? This has eaten up a lot of my... (4 Replies)
Discussion started by: aarond
4 Replies

8. UNIX for Dummies Questions & Answers

Sudo -s without password prompt

hi, i have a requirement where i need to sudo to another user in the shell script.suppose consider user A and B, first user A calls a shell script and then i need to sudo to user B which executes another shell script inside the earlier one. also this needs to be automated like while sudo'ing to... (3 Replies)
Discussion started by: krk
3 Replies

9. Homework & Coursework Questions

Shell Script Password Prompt

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: I am trying to write a shell script that prompts the user for the password which is "lux" once the correct password... (4 Replies)
Discussion started by: Emin_Em
4 Replies

10. Shell Programming and Scripting

Expect script not expecting the password prompt

I have a script that does an SSH into a remote node. It should expect the prompt and send the password. #!/usr/bin/expect set user ; set pass ; spawn ssh $user@E-Internal expect { -re "RSA key fingerprint" {send "yes\r"} timeout... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies
VIPW(8) 						    BSD System Manager's Manual 						   VIPW(8)

NAME
vipw -- edit the password file SYNOPSIS
vipw [-d directory] DESCRIPTION
The vipw utility edits the password file after setting the appropriate locks, and does any necessary processing after the password file is unlocked. If the password file is already locked for editing by another user, vipw will ask you to try again later. The default editor for vipw is vi(1). When run without options, vipw will work with the password files in /etc. The -d option may be used to specify an alternative directory to work with. The vipw utility performs a number of consistency checks on the password entries, and will not allow a password file with a ``mangled'' entry to be installed. If vipw rejects the new password file, the user is prompted to re-enter the edit session. Once the information has been verified, vipw uses pwd_mkdb(8) to update the user database. This is run in the background, and, at very large sites could take several minutes. Until this update is completed, the password file is unavailable for other updates and the new information is not available to programs. ENVIRONMENT
If the following environment variable exists it will be utilized by vipw: EDITOR The editor specified by the string EDITOR will be invoked instead of the default editor vi(1). This can be used to allow a script to non-interactively modify the password file. PW_SCAN_BIG_IDS See pwd_mkdb(8). SEE ALSO
chpass(1), passwd(1), passwd(5), adduser(8), pw(8), pwd_mkdb(8) HISTORY
The vipw utility appeared in 4.0BSD. BUGS
The mechanism for checking for password file modifications requires that the modification time of the password file changes. This means that in a default configuration where file system timestamps are not calculated with sub-second precision, EDITOR has to run for at least one sec- ond. Non-interactive editor scripts should invoke sleep(1) or equivalent to ensure this happens. BSD
February 14, 2012 BSD
All times are GMT -4. The time now is 01:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy