Visit Our UNIX and Linux User Community


Can we spy a tty session?


 
Thread Tools Search this Thread
Operating Systems Solaris Can we spy a tty session?
# 1  
Old 08-17-2010
Can we spy a tty session?

First of all, in no way I want to use this to hack / cheat / steal etc ...

I am an admin of a couple of hundred users which are 99,8% > 500miles away from me and to facilitate some administration part I would like to be able to "spy" what they are doing in there sessions, live.

ex:

Code:
 11:53am  up 83 day(s), 21:25,  X users,  load average: 0.45, 0.46, 0.45
User     tty           login@  idle   JCPU   PCPU  what
RandomUserOne  pts/1         3:26am  8:26                bash

Can I "spy" 'RandomUserOne' on pts/1?

Google was useless btw ... I might just not be using the right terms ...
# 2  
Old 08-17-2010
There have been programs in the past like ttysnoop... and I've used them (at the request of clients). They basically replace login. But with Solaris changes, not sure if any of that is applicable anymore.
# 3  
Old 08-17-2010
That is wat I was expecting ... I was looking for something more "native". I will have to stick with de damn screenshots I guess.

Thanks cjcox for your time.
# 4  
Old 08-17-2010
you can snoop EVERYTHING inside solaris (10) with "dtrace".

DTrace Tools
BigAdmin: DTrace
# 5  
Old 08-19-2010
You can use screen utility, It's available on sunfreeware.
User has to run:
Code:
$ screen

then you have to switch to that user and run:
Code:
$ screen -x

This way you can see everything that happens on his/her terminal. It's not very secure as you have to temporarily chmod on /dev/pts/X but it does the job.
# 6  
Old 08-20-2010
you can "ptree" on the user PID as well :

#ps -ef |grep ssh
#ptree <pid>

Can Do a loop (bash):

for (( ; ; ));do ptree <pid>; sleep 10; done

Fabien
This User Gave Thanks to unclefab For This Post:
# 7  
Old 08-20-2010
Thanks unclefab, that is not exactly what I was looking for but it is totally awesome!

Previous Thread | Next Thread
Test Your Knowledge in Computers #962
Difficulty: Medium
ILOVEYOU, sometimes referred to as Love Bug or Love Letter, was a computer worm that attacked tens of millions of Windows PCs on and after 5 May 2000 local time in the Philippines.
True or False?

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. Shell Programming and Scripting

Forcing a tty session but getting a password prompt?

I have a master host I want to use to issue some start/stop of LDAP services. I changed the client hosts /etc/sudoers to have Defaults:infra !requiretty The master host kicks off the jobs using the infra account doing a ssh session to the infra account on the clients. #!/bin/ksh ps -fu... (5 Replies)
Discussion started by: J-Man
5 Replies

3. Solaris

I am not able to login in gnome session and java session in Sun solaris 9& 10

I am not able to login in gnome session and java session in Sun solaris 9& 10 respectively through xmanager as a nis user, I am able to login in common desktop , but gnome session its not allowing , when I have given login credentials, its coming back to login screen, what shoul I do to allow nis... (0 Replies)
Discussion started by: durgaprasadr13
0 Replies

4. Shell Programming and Scripting

sqlplus session being able to see unix variables session within a script

Hi there. How do I make the DB connection see the parameter variables passed to the unix script ? The code snippet below isn't working properly. sqlplus << EOF user1@db1/pass1 BEGIN PACKAGE1.perform_updates($1,$2,$3); END; EOF Thanks in advance, Abrahao. (2 Replies)
Discussion started by: 435 Gavea
2 Replies

5. Programming

PIpe Spy

Im trying to get my program to behave in this way: prog 1 | ./pipespy myfile.dat | prog2 the standard output of prog1 is supplied as the input to prog2 and copied into file myfile.dat. need help (11 Replies)
Discussion started by: jodders
11 Replies

6. UNIX for Dummies Questions & Answers

i-spy for UNIX - What is it??

I'm just after finding a file resding in my temporary directory(/tmp) on my machine called 'i-spy' This file is owned by root and ordinary muppets like me cant delete it, open or even do a more or cat on it. I'm running Solaris 2.6 on a Sun Ultra 5. Can anyone out there give me a good... (1 Reply)
Discussion started by: Kanu77
1 Replies

7. Shell Programming and Scripting

Game spy arcade for halo and macintosh?

I need help i heard you can play halo over online and you have a macintosh version where can I get it please respond (1 Reply)
Discussion started by: memattmyself
1 Replies

Featured Tech Videos