The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to pass values between awk and shell scripts rajnikanth.1912 Shell Programming and Scripting 9 03-20-2009 02:25 PM
Oracle Passwords in Unix scripts clifford Shell Programming and Scripting 5 05-16-2008 12:33 PM
Checking passwords - scripts bullz26 Shell Programming and Scripting 5 03-11-2008 08:21 AM
Bash script pass sentence in block katrvu Shell Programming and Scripting 6 02-11-2008 11:04 AM
How to pass values from one file to different scripts pssandeep UNIX for Dummies Questions & Answers 6 12-14-2007 07:14 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-04-2006
siegfried siegfried is offline
Registered User
  
 

Join Date: Oct 2005
Posts: 91
How to pass passwords to bash scripts?

I'm finding the following command very tedious to type in all the time, so I created a one line bash script called mount.bash with the following contents:

mount -t cifs //mark/C\$ -o unc=//mark\\C$,ip=10.1.1.33,user=Administrator,password=$1 /mnt/mark

I don't like the fact that I have to put my password on the command line. What can I do to to prompt for $1 if it is not provided on the command line and echo "*"'s instead of the actual characters being typed?

Thanks,
Siegfried
 

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:57 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0