LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 12-14-2005, 12:00 PM   #1
yoshiznit123
LQ Newbie
 
Registered: Dec 2005
Posts: 6

Rep: Reputation: 0
cat /dev/tty?


Hi, I was just messing around on my linux box and I tried 'cat /dev/tty2'. Then I tried logging in on that terminal, and when I entered my password it appeared in the output of the first terminal... I was wondering if this was normal and/or why it happens. Thanks :-)
 
Old 12-14-2005, 12:05 PM   #2
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Rep: Reputation: Disabled
cat just dumps the contents of whatever you feed it. In Unix systems, any output can become input. You may also find the following interesting:

cat /dev/input/mice (or whatever device your mouse is) then move the mouse around
cat /dev/urandom
 
Old 12-14-2005, 12:18 PM   #3
yoshiznit123
LQ Newbie
 
Registered: Dec 2005
Posts: 6

Original Poster
Rep: Reputation: 0
Cool, but why does cat only output the password when I try to login, not the username or anything?
 
Old 12-14-2005, 12:44 PM   #4
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Yes, this is true. What happens is that everything input into that particular tty is spit out to the catenation you are performing. Note that, unless you are root, you can only do this on tty's that you are currently logged into, because the permissions are set that way. Yes, security is taken care of for this sort of thing.
 
  


Reply


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
What would happen if I where to cat /dev/mem > /dev/null Joey.Dale Linux - General 11 07-26-2009 12:46 PM
cat /dev/ts lyang1981 Linux - Hardware 2 03-17-2005 12:43 PM
cat /dev/ts lyang1981 Linux - Software 2 03-17-2005 01:13 AM
cat /dev/ts on Zaurus lyang1981 Linux - Laptop and Netbook 3 03-17-2005 01:12 AM
mandrake cat > /dev/dsp no response jahm Linux - General 6 06-19-2003 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:14 PM.

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