Take over a Bash-process.


 
Thread Tools Search this Thread
Special Forums Cybersecurity Take over a Bash-process.
# 1  
Old 11-18-2009
Take over a Bash-process.

Hi!
I'm not really sure if this is the right forum to post this thread in but I'll try anyway.

I was just wondering if it's possible to "take over" a Bash process?
For example, if a user is logged in to my server (where I'm root) can I then somehow "clone" his session so I can see what he's writing and stuff in real-time?
Just like screen work, only he doesn't know about it.
# 2  
Old 11-18-2009
The /proc directories for the user process have that a lot of that infomation.
Try info proc or man proc. I am assuming Linux becuase you mentioned bash.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Use the get and post method in the bash ( multi process)?

hi I want to call a lot of links with the post method What to do to speed it up?? ####This method is slow #!/bin/bash func2() { index1=0 while read line ; do index1=$(($index1+1)) url=$line done < tmp/url1.txt } (10 Replies)
Discussion started by: mnnn
10 Replies

2. Shell Programming and Scripting

Bash process timer

I have a bash with several processes in it, that I would like to include a progress bar or percentage complete. Below are two separate processes that, so the user knows that something is happening, there is an an indicator for each process. Maybe, at the start of each new process a printf the... (2 Replies)
Discussion started by: cmccabe
2 Replies

3. Shell Programming and Scripting

Bash-awk to process thousands of files

Hi to all, I have thousand of files in a folder with names with format "FILE-YYYY-MM-DD-HHMM" for what I want to send the following AWK command awk '/Code.*/' FILE-2014* I'd like to separate all files that have the same date to a folder named with the corresponding date. For example, if I... (7 Replies)
Discussion started by: Ophiuchus
7 Replies

4. Shell Programming and Scripting

Killing a bash process and running the second part of script

I want to run a script that calls remote ssh and if it gets hung, I want to be able to kill that part of the script and run another command in the script for example I have a statement like this: if ]; then export tapes=$(for tape in $(su - nacct -c 'ssh remote1 "cat... (1 Reply)
Discussion started by: newbie2010
1 Replies

5. Shell Programming and Scripting

Help about bash process

I have function f1 and f2, I want it excute five items with different function in the list the the same time with process. I did a testing in start_build_feature1, it sleep about 100s, in the sleeping start_build_feature2 print nothing, can someone help me modify this scripts I don't when... (2 Replies)
Discussion started by: yanglei_fage
2 Replies

6. Shell Programming and Scripting

Bash process output analysis

Looking to create a script to listen to each output from a task while it is running and launch a function if a specific error message is found at any point and if not to continue uninterrupted. #!/bin/bash read checker <<< $(reaver -i mon0 -b 'target bssid' -vv) if ; then function elif... (1 Reply)
Discussion started by: 3therk1ll
1 Replies

7. Shell Programming and Scripting

bash: closing file descriptors from a process

Below is a test script to illustrate a problem from a larger script I am writing. $ cat /tmp/loggingtest #!/bin/bash lvcreate -s -l 100%FREE -n var-data-snapshot vg00/var-data 2> >(logger -t "loggingtest.crit") 1> >(logger -t "loggingtest.info") sync & wait lvremove -f... (1 Reply)
Discussion started by: jelloir
1 Replies

8. Shell Programming and Scripting

[KSH/Bash] Starting a parent process from a child process?

Hey all, I need to launch a script from within 2 other scripts that can run independently of the two parent scripts... Im having a hard time doing this, if anyone knows how please let me know. More detail. ScriptA (bash), ScriptB (ksh), ScriptC (bash) ScriptA, launches ScriptB ScirptB,... (7 Replies)
Discussion started by: trey85stang
7 Replies

9. Shell Programming and Scripting

Catching SIG of running process with bash

Hello all! I'm writing a script that will catch when an outside process crashes (SIGHUP, right?) without having to loop into infinity. With that in mind, I came across the trap utility and thought if could be used to monitor another process other than it's own. But from what I've read, I'm... (1 Reply)
Discussion started by: mashiox
1 Replies

10. Shell Programming and Scripting

starting a bash session as child process to another bash session from a process

Hi I want to do something that might sound strange. I have a code that in written in C and is executed at startup (it's a custom process). It occasionally calls some bash scripts. The process doesn't have any terminal associated with it. One thing I don't know how to do is to start a... (5 Replies)
Discussion started by: alirezan
5 Replies
Login or Register to Ask a Question