LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-18-2011, 03:40 PM   #1
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Rep: Reputation: 5
variable as a password ?


Hello y'all, I created a variable that Serves as a password, the problem an having is that anytime I type the word, its visible and I don't want it to be visible and seen in my screen anytime its typed. You know when you use the "SU" command and you type in the password its doesn't show on the screen, don't know of there is anything I can also to make my secret word not to show when I type it in. For better understanding, I wrote a script that test for a condition, if the condition is met then its request for a word. So this is what an actually trying to protect. Don't know if this can be achieved. Thanks in anticipation.
 
Old 02-18-2011, 03:43 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
I take it you are talking about a bash script, I presume?
 
Old 02-18-2011, 05:00 PM   #3
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Hi,

Do you mean something like this
Code:
read -rs variable
 
Old 02-19-2011, 12:09 AM   #4
Ribo01
Member
 
Registered: Aug 2010
Posts: 103

Original Poster
Rep: Reputation: 5
Its like my post was not explicit enough, cause no one seems to understand. I wrote a script and put in my ~/.bashrc to test for a condition, if that condition is met then its request a word, and of the wrong word is supplied the terminal exits. Its a way of conttolling access to my terminal. What I really want now is to know of there. Is anything that can be done so when o type in the word its does not show on my screen. Like the way "su" password stays invisible on the screen.
 
  


Reply



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
Bash: Input password into a variable 1veedo Linux - General 5 08-24-2010 03:07 AM
Script to copy specific directory based on variable to folder with that variable name fluxburn Programming 7 01-07-2010 07:59 PM
AWK a variable Ouptut to a new variable and using the new variable with the old one alertroshannow Linux - Newbie 4 02-16-2009 12:08 AM
Sed search for variable and delete entire line, but variable contains forward /'s Passions Programming 2 11-10-2008 03:44 PM
setting proxy username and password in environment variable maveickstorm Linux - Networking 2 11-21-2006 12:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:56 AM.

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