Page 1 of 1

Need to find a text file through a running process

Posted: 2017-11-21 10:41
by nvakada
Hi Guys,

I have an assignment to find a file (contains some sort of text), which was opened by one of the running process which is also not part of the reggular process that should be running in the debian server.

So, I am stuck with neither the filename nor the process which has opened it.

Re: Need to find a text file through a running process

Posted: 2017-11-21 10:48
by arochester
We do not do homework/assignments for people.

Your problem is hypothetical rather than practical. It is so you can learn, not ask.

We might help if you explain exactly what you have done.

Re: Need to find a text file through a running process

Posted: 2017-11-21 11:19
by nvakada
understood..

I tried listing the current running process by ps -ef. I am not sure about the default running processes that should be running so I am having hard time segregating that.

I did try out lsof -p PID for few of them which I thought would be odd man outs..

Clearly I am kind of stuck here with this scenario.

any pointers for the default processes that should be running as part of the new server setup.

Re: Need to find a text file through a running process

Posted: 2017-11-21 17:23
by debiman
i don't really understand the question either.
what's "one of the running process which is also not part of the reggular process that should be running in the debian server" supposed to mean?
was this originally written in english, or did google.translate mangle it?

fwiw, lsof and ps are the commands that first popped into my mind, too.

Re: Need to find a text file through a running process

Posted: 2017-11-21 19:42
by pendrachken
This is a pretty standard multi part question. Break it down into steps to solve, and it actually becomes pretty easy.


I will only give you the first question you can ask yourself to start solving the whole chain:

1: How do I find out what is in a standard Debian install.
2:?????
3:?????


Once this is done, you will look back and think it was sooo much easier than when you first started looking at as a whole problem ( and this is WHY they teach CS this way).

Re: Need to find a text file through a running process

Posted: 2017-11-21 20:01
by nvakada
This is part of a test

actual question below (like RHCE exam)

After you successfully upload your public key, please access the server by ssh on port 22022 as user "test". This user has sudo rights.
Once you are logged into the server, you should search for a running process that shouldn't be there and check the files opened by it: you will find the list of tasks to be accomplished hidden in one of them!

Re: Need to find a text file through a running process

Posted: 2017-11-21 20:10
by Wheelerof4te
We don't solve people's exams here. This forum is for technical help and discussions about Debian. Among users.

Re: Need to find a text file through a running process

Posted: 2017-11-21 20:16
by nvakada
pendrachken wrote:This is a pretty standard multi part question. Break it down into steps to solve, and it actually becomes pretty easy.


I will only give you the first question you can ask yourself to start solving the whole chain:

1: How do I find out what is in a standard Debian install.
2:?????
3:?????


Once this is done, you will look back and think it was sooo much easier than when you first started looking at as a whole problem ( and this is WHY they teach CS this way).
How do I find out what is in a standard Debian install. - This would suffice.. any installation guide that I could look into..

Re: Need to find a text file through a running process

Posted: 2017-11-21 20:21
by GarryRicketson
Read some of the documentation at www.debian.org
Don't your school teachers teach you how to do a simple search ?
How do I find out what is in a standard Debian install.

2 of many hits:
https://wiki.debian.org/tasksel
https://www.debian.org/releases/stable/installmanual

Re: Need to find a text file through a running process

Posted: 2017-11-21 20:36
by nvakada
GarryRicketson wrote:Read some of the documentation at http://www.debian.org
Don't your school teachers teach you how to do a simple search ?
How do I find out what is in a standard Debian install.

2 of many hits:
https://wiki.debian.org/tasksel
https://www.debian.org/releases/stable/installmanual

Just gone through "http://www.catb.org/esr/faqs/smart-questions.html"

I've done a huge mistake by posting this question. Lesson learnt.. :(

Re: Need to find a text file through a running process

Posted: 2017-11-22 05:40
by debiman
nvakada wrote:Just gone through "http://www.catb.org/esr/faqs/smart-questions.html"
I've done a huge mistake by posting this question. Lesson learnt.. :(
well, good that you read it, but "huge mistake" is a little over the top.
:mrgreen:
nvakada wrote:Once you are logged into the server, you should search for a running process that shouldn't be there
i think this is not meant literally, but more as a suggestion:
have a look at the processes running, find one that looks suspicious.
you can use the 'top' command for that.
you could install another debian server in a vm to see what should be there, but my guess is it will just pop out at you.

PS: "Running process" is another important hint

Re: Need to find a text file through a running process

Posted: 2017-11-23 23:23
by makh
nvakada wrote:... Once you are logged into the server, you should search for a running process that shouldn't be there ....and check the files opened by it: you will find the list of tasks to be accomplished hidden in one of them!
After login to server:
1. You need to find an additional process. (hint: it was not supposed to be running)
2. Once you do that... then only:
2a. check the files opened by it.
2b. you will find the list of tasks to be accomplished hidden in one of them.

Hope you solve it OR you may post the login to the Server :roll: ... :arrow: