Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Shell programming - user prompts

Posted on 2003-03-05
4
Medium Priority
?
204 Views
Last Modified: 2013-12-26
I want to create a prompt that ask for the userid and the password.  This is not a problem but how do I get the password prompt to not show the password as it is typed in and show *'s or #'s instead?
0
Comment
Question by:jwdba
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 300 total points
ID: 8072802
stty -echo
read password?password:
stty echo
0
 
LVL 9

Expert Comment

by:HamdyHassan
ID: 8072842
stty -echo
( unix input command for password)
stty echo
0
 
LVL 9

Expert Comment

by:HamdyHassan
ID: 8072864
ahoffmann,
I didn't read your post, I was just working hard to remember this command , when I found it I just post with refreshing to see if somebody did it also.

jwdba,
this solution will make invisiable entry when the user unput his password, and I think you need to notify the user about that, otherwise he will think something wrong with his keyboard

0
 

Author Comment

by:jwdba
ID: 8072916
Thank you both.  I knew it was something simple, I just could not track down the solution.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question