The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Finding Hidden files and protecting the folder containing hidden files from deletion pochaw Shell Programming and Scripting 4 12-22-2007 01:33 AM
How to check for hidden file Raynon Shell Programming and Scripting 8 09-06-2007 04:00 AM
Hidden Characters Khoomfire UNIX for Advanced & Expert Users 6 07-06-2007 04:40 AM
missing hidden characters SUSANR9999 UNIX for Dummies Questions & Answers 2 11-09-2006 04:30 PM
hidden output slavam Shell Programming and Scripting 3 08-25-2004 06:07 PM

Closed Thread
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
  #1 (permalink)  
Old 09-21-2005
neto neto is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 1
Hidden passwords

Upon executing a script that sets the value to a password variable, is there a way to hide a password value from being detected in standard out?
  #2 (permalink)  
Old 09-21-2005
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
If you need to authenticate using name/passwd use those credentials within a here-document.

A quick googling gave these

Hiding the password

There is an interesting solution described in this link

How can I hide passwords in a shell script?

And finally, Can one prevent passwords from appearing in the system process table?

vino
  #3 (permalink)  
Old 09-21-2005
nir_s nir_s is offline
Registered User
  
 

Join Date: Jun 2004
Posts: 148
The following function demostrate how to ask from user to enter a password.
The password is invisable:

Code:
check_schema_password()
{
echo "Please enter $SCHEMA_NAME password (default $SCHEMA_NAME):"
tput invis
read answer
tput sgr0
if [[ $answer = '' ]] ; then
  export SCHEMA_PASS=${SCHEMA_NAME}
else
  export SCHEMA_PASS=${answer}
fi
}
Nir
Closed Thread

Bookmarks

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 08:34 AM.


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