Shell programming - user prompts

Posted on 2003-03-05
Medium Priority
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?
Question by:jwdba
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 51

Accepted Solution

ahoffmann earned 300 total points
ID: 8072802
stty -echo
read password?password:
stty echo

Expert Comment

ID: 8072842
stty -echo
( unix input command for password)
stty echo

Expert Comment

ID: 8072864
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.

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


Author Comment

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

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

762 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