Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-20-2008, 08:27 AM   #1
LQ Newbie
Registered: Feb 2008
Location: Pune, Maharastra, India
Posts: 9

Rep: Reputation: 0
Lightbulb Disabling echo on the terminal!

echo -n Enter your password
stty -echo
read password
stty echo

This shell scripts asks for the password.
When the user types it, it will not be echoed on the screen. How to implement the same using C Language Library Functions.
Old 02-20-2008, 08:38 AM   #2
Registered: Jul 2004
Location: Czech Republic - Roudnice nad Labem
Distribution: Debian
Posts: 253

Rep: Reputation: 34
See man page for termios

If ECHO is set input characters are echoed back to the terminal. If ECHO is not set, input characters are not echoed.
Old 02-21-2008, 10:15 PM   #3
LQ Newbie
Registered: Feb 2008
Location: Pune, Maharastra, India
Posts: 9

Original Poster
Rep: Reputation: 0

Thankyou very much for your valuable reply.
C.Bhanu Kiran



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I echo a message to a terminal on another IP address fdvj Linux - Newbie 5 05-13-2013 09:04 AM
Disabling local echo on rs232 serial port... Fred_213 Programming 1 11-02-2006 05:30 PM
Ethernet to Serial Terminal Echo andig Linux - Newbie 1 01-22-2006 06:25 PM
Prevent Terminal Echo Using Python (for Passwords) taylor_venable Programming 4 07-06-2005 12:52 AM
Need Linux Help:Problem with disabling echo ebh1 Programming 1 09-22-2003 05:04 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:42 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration