LinuxQuestions.org
Help answer threads with 0 replies.
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 06-08-2005, 02:28 PM   #1
rainman4_8
LQ Newbie
 
Registered: Nov 2003
Location: washington
Distribution: still looking
Posts: 16

Rep: Reputation: 0
TTY echo / redirection / monitor howto


Is there a way to view a session of another user logged in via terminal?

eg.

'w' lists current users on pty/0, pty/1, pty/2.

From pty/0 I want to see all commands and output from pty/2.


Thanks.


(I also vaguely recall being able to export the display in X windows to run things under a different user context? Would this be related?)
 
Old 06-09-2005, 08:18 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
You could add these lines in the ~/.bash_profile of the user
(assuming bash is the default shell)
Code:
rm -f /tmp/myoutput > /dev/null 2>&1
mkfifo /tmp/myoutput
script -f /tmp/myoutput
Then after he logged, just type in your terminal :
Code:
cat /tmp/myoutput

Last edited by keefaz; 06-09-2005 at 08:24 AM.
 
Old 06-28-2005, 02:46 PM   #3
ksas025
LQ Newbie
 
Registered: Nov 2004
Posts: 6

Rep: Reputation: 0
Is there any other way to do this? While this works really good for the monitoring of specific users, many times a who is executed and suspicious terminals are open. I need to know what is going on in that terminal immediately; not next time they login.

Can a terminal be set up to pipe to a FIFO while it is active?
 
  


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
Monitor Refresh Rate on TTY WolfBLN Linux - Hardware 1 06-17-2005 09:07 AM
Kphone echo (echo echo) scabies Linux - Software 0 10-18-2004 03:59 PM
change tty => system crashes (ati driver/tty resolution) mosca Debian 6 08-05-2004 08:37 AM
HowTo disable LCP echo request fransemail Linux - Software 2 05-04-2004 04:08 PM
Disable Monitor Sleep [in fluxbox and from tty] VxJasonxV Red Hat 7 01-29-2004 05:43 PM


All times are GMT -5. The time now is 09:35 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration