Tail users commands
Hello All,
I have a quick question , This happened to me when I was logged in as a regular user in a production server . I was executing few commands , the person who was helping me was logged into the same host from another location (NY or something).I executed a script which is not accurate for that version of application running in the host . Then he pinged me via Microsoft communicator and instructed me not to use that script rather to use correct script for that version. From then I was intrigued by how he found that out , I know that if one has root access he can view other users command history file but even root cannot tail the command history file.root can only cat the file once the user has ended the session. Although "top -U username" will briefly show the command executed by the user. Anyone here has any idea of how to tail other users commands or tail their command history file when they are in action. thanks in advance, |
Perhaps he just saw the results of the script and realised it was the wrong one? Is the script names differently? perhaps he ran the ps or top command?
|
Hi,
Maybe he's paranoid and watches logged on users with the 'w' command. That'll tell him what you are doing. He can even tail it with the use of a fifo pipe. Kind regards, Eric |
Thanks devnull10,
Result of the script is not something logged anywhere or it doesnt leave any trace around , and yes the 2 scripts names are different. Thanks EricTRA, As far as i knew "w" command will only show who logged in from where and time. Am not sure about what you mean by "He can even tail it with the use of a fifo pipe" could you please elaborate Thanks, |
Hello,
Output of who: Code:
root tty1 2010-01-30 12:06 Code:
21:18:52 up 9:14, 5 users, load average: 0.73, 0.83, 0.67 Code:
mkfifo nameyougive Code:
tail -f nameyougive Code:
w > nameyougave Kind regards, Eric |
Thanks EricTRA,
mkfifo gives me the following error, mkfifo: cannot create fifo `test': Operation not permitted is it possible only for root to mkfifo . Kindly advise |
He was probably monitoring the log file for the application that you used in the script in a terminal via the "tail -f filename" command.
|
Thanks for the response,
However this command worked $mkfifo /tmp/myfifo seems like a permission issue. |
Hello All,
The use of named pipe doesn't seem to work the expected way . whichever command (w , who , top -U <username>) doesn't seem to work the exact way as expected , none of the command redirected into the named pipe seems to show what that user is executing ,Is there any other way to accomplish the intial cause of this thread Thanks. |
Lateral approach; ask the guy who was monitoring you ...
|
All times are GMT -5. The time now is 03:50 AM. |