SUMMARY: Password in shell script

From: Truhn Chad M CONT DLVA <TruhnCM_at_NSWC.NAVY.MIL>
Date: Wed Oct 20 2004 - 08:38:53 EDT
Thanks to everyone who responded, there were too many to name. 
 
The general consensus between everyone was to use:
 
echo "password"
stty -echo     #turns echo off
read password
stty echo      #turns echo back on
 
or could use
 
echo "password"
read -s password    #  -s allows silent entry
 
Thanks again.  You all saved me a lot of time!!!!
 
Chad Truhn

-----Original Message-----
From: Truhn Chad M CONT DLVA 
Sent: Wednesday, October 20, 2004 7:51 AM
To: 'sunmanagers@sunmanagers.org'
Subject: Password in shell script


All:
 
I am trying to write a bash script that prompts a user for a password if
they want to run a specific function.  I was able to encrypt the password so
that users cannot just 'more' a file and see the password, but when the
script is ran and it prompts for a password, it shows what they type on the
terminal.  How do I change this so that their input is not displayed on the
screen for this line?  I figure it is probably a single command, but I don't
even know where to begin to look.
 
Any help would be appreciated.  
 
TIA

Thanks, 
Chad M Truhn
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Oct 20 08:39:24 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:38 EST