Send password : In Background


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Send password : In Background
# 1  
Old 09-16-2008
Send password : In Background

Hi All,

How to pass the password in background.....?


" /usr/bin/hdiutil attach -mountroot -stdinpass /path/to/mount/
/path/of/image/TEST.sparseimage "


The above command asks the password to mount a sparse image and when
supplied it gets mount. But my requirement is to use this command within
a shell script to mount the sparse image, and I don't want to store the
password in key chain file. How I would pass the password to this command
to mount the sparse image......?

Please suggest me...
# 2  
Old 09-16-2008
You may need to use tools such as "expect" to handle this
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Password expiry send to individual user

Hi Folks, I am having a script which will send out the password expiry email notification with just the username to a common group id, but I am looking for a change in like: the password expiry email notification should send to an individual user account with their email id including the... (1 Reply)
Discussion started by: gsiva
1 Replies

2. UNIX for Advanced & Expert Users

Send current script to background

Hi scripters, I'm quite used to run commands in the background using & like in: $ myscript &But this is NOT what I'm trying to do today. What I'm trying to achieve is to run a script the normal way (without &), have my script do a little checkup and then jump to background. Something like:... (5 Replies)
Discussion started by: chebarbudo
5 Replies

3. Shell Programming and Scripting

Send sleep to background

Hello all, I've a small script where it checks for the existence of a particular file and sleeps for 5 seconds if it doesn't exist. I would like to send the sleep output to background so that I don't see so many sleep messages in the build output. #!/bin/sh -x until do sleep 3 done echo... (17 Replies)
Discussion started by: builderj
17 Replies

4. Shell Programming and Scripting

Script to send an email for password expiry

Newbie in scripting Please assist with a script to send an email to all users seven days before their passwords expires.Aging set for 90 days. # chage -l user1 Last password change : Jul 08, 2015 Password expires :... (4 Replies)
Discussion started by: tshepang
4 Replies

5. Shell Programming and Scripting

How to send Two different password in Single script, having same username..?

Hi Team, i want to input two password for single node like pass1/pass2 one of the pass1 is working some node and pass2 is working for some nodes . For nodes having pass1 i have to run different script and for nodes having pass2 i have to run different script Sooo how can put two pass... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies

6. UNIX for Dummies Questions & Answers

How do I send output of a background process to a file other than nohup.out?

I have a question. I will be running a background process using nohup and & command at end. I want to send output to a file say myprocess.out. So will this command work? nohup myprocess.ksh > myprocess.out & Thanks in advance guys !!! :) (3 Replies)
Discussion started by: vx04
3 Replies

7. UNIX for Dummies Questions & Answers

Send job to Background after input redirection

Hi, I am having issues with syntax when I am trying to send a job to the background after a input redirection. I have this script which sends some files to different servers after zipping them. Once I execute it, it will ask for user input as of which server the files need to go to. (The... (3 Replies)
Discussion started by: grep_me
3 Replies

8. Shell Programming and Scripting

Send Foreground job to background redirecting output

I have many CPU intensive processes running and sometimes I run them in the foreground so that I can see what the output is. I want to send that foreground process to the background, but also have it direct the output to a logfile. I know to send something to the bg I do Ctrl-z on the FG... (6 Replies)
Discussion started by: jhullbuzz
6 Replies

9. UNIX for Advanced & Expert Users

send a new value to a variable in a running background process

Hi guys, I have a issue with a background process, I need to update the value of a variable in that process which is running at this time and it will be running for at least 2 days. Any idea? I will apreciate your help. regards. Razziel. (2 Replies)
Discussion started by: razziel
2 Replies

10. Solaris

how can i send via SFTP information with my password encrypted?

I have a Solaris 5.9 server and need send information via SFTP automaticaly, and set my username and password encrypted. How can I do this? Best regards (1 Reply)
Discussion started by: irasela
1 Replies
Login or Register to Ask a Question