Need to find a text file through a running process

Here you can discuss every aspect of Debian. Note: not for support requests!

Need to find a text file through a running process

Postby nvakada » 2017-11-21 10:41

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.
nvakada
 
Posts: 5
Joined: 2017-11-21 10:37

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

Postby arochester » 2017-11-21 10:48

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.
"Something to be aware of: Debian is a core or source distribution. This means there are many Debian-based distributions. THEY ARE NOT DEBIAN."
arochester
 
Posts: 1114
Joined: 2010-12-07 19:55

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

Postby nvakada » 2017-11-21 11:19

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.
nvakada
 
Posts: 5
Joined: 2017-11-21 10:37

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

Postby debiman » 2017-11-21 17:23

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.
User avatar
debiman
 
Posts: 1626
Joined: 2013-03-12 07:18

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

Postby pendrachken » 2017-11-21 19:42

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).
fortune -o
Your love life will be... interesting.
:twisted: How did it know?

The U.S. uses the metric system too, we have tenths, hundredths and thousandths of inches :-P
pendrachken
 
Posts: 1291
Joined: 2007-03-04 21:10
Location: U.S.A. - WI.

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

Postby nvakada » 2017-11-21 20:01

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!
nvakada
 
Posts: 5
Joined: 2017-11-21 10:37

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

Postby Wheelerof4te » 2017-11-21 20:10

We don't solve people's exams here. This forum is for technical help and discussions about Debian. Among users.
Last edited by Wheelerof4te on 2017-11-21 20:26, edited 1 time in total.
User avatar
Wheelerof4te
 
Posts: 439
Joined: 2015-08-30 20:14

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

Postby nvakada » 2017-11-21 20:16

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..
nvakada
 
Posts: 5
Joined: 2017-11-21 10:37

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

Postby GarryRicketson » 2017-11-21 20:21

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
"What we expect you have already Done"

Before doing anything, read the Debian documentation:
Debian Documentation
How to ask the smart way
Debian Foro Español
======================
For the Birds
User avatar
GarryRicketson
 
Posts: 4464
Joined: 2015-01-20 22:16
Location: Durango, Mexico

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

Postby nvakada » 2017-11-21 20:36

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.. :(
nvakada
 
Posts: 5
Joined: 2017-11-21 10:37

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

Postby debiman » 2017-11-22 05:40

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
User avatar
debiman
 
Posts: 1626
Joined: 2013-03-12 07:18

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

Postby makh » 2017-11-23 23:23

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:
HP Probook 440 G2: Arch, Debian Stable
Server: none
Past: Debian, Centos, Ubuntu, Opensuse
GUI: Openbox, Cinnamon
Chroot: Debian, Ubuntu, Fedora
VM: Devuan

Employing the best:
Arabic
Debian
Homeopathic

For new: Try Linux Mint
User avatar
makh
 
Posts: 567
Joined: 2011-10-09 09:16


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable