LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-19-2009, 02:27 AM   #1
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Rep: Reputation: 21
Can one know from which server a particular command was run in a network?


Hi All,
I wanted to know which file I have to look to see from which server a particular command was run in a network.For eg.Suppose if someone logs into a server and runs a shutdown command on that server which file should I look to trap the culprit as in you ran that command and from which ip-address.


Ajit
 
Old 05-20-2009, 03:37 AM   #2
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
If somebody logs in to your server that is possible through ssh. I don't know where exactly you will get "commands run by users" but the possible path could be


/var/log/secure


from secure you can see at what time near to your pc shutdown someone loged in to your server..

BTW how an unwanted user logs in to your server?


Cheers!!
 
1 members found this post helpful.
Old 05-20-2009, 05:16 AM   #3
Ajit Gunge
Member
 
Registered: Jan 2008
Location: Pune
Distribution: RHEL,fedora
Posts: 253
Blog Entries: 1

Original Poster
Rep: Reputation: 21
Quote:
Originally Posted by baig View Post
If somebody logs in to your server that is possible through ssh. I don't know where exactly you will get "commands run by users" but the possible path could be


/var/log/secure


from secure you can see at what time near to your pc shutdown someone loged in to your server..

BTW how an unwanted user logs in to your server?


Cheers!!
Thanks.That file has the information of the user that looged into the server through ssh.Actually I wanted to know this information itself its not that anyone unwanted is logging into my server and all....

Ajit
 
Old 05-20-2009, 05:20 AM   #4
kpraveen455
Member
 
Registered: Feb 2009
Location: Hyderabad
Distribution: fedora
Posts: 33

Rep: Reputation: 17
Smile

One way is to check all the users 'bash_history' and check who is the actual culprit. The procedure can be like this:

1) Login to server, change to superuser mode
2) Then check the bash history of all the users
/home/user/.bash_history

3) If required use the command "last" to know about the users last logged into your server

last -i (Displays the IP number of the remote host)

This is one of the way! even though a better way may still exist.
 
Old 05-20-2009, 05:28 AM   #5
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

Rep: Reputation: 148Reputation: 148
implement the "sudo", i think this may be useful to identify the users activities and you can restrict their activities
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
run command on remote server ust Linux - Newbie 1 09-09-2008 09:10 AM
How do I run the Fedora 9 Server Network Config GUI sneaky Linux - Server 40 09-02-2008 04:41 PM
Can i put Windows based PCs on a Linux run server network? bigalexe Linux - Server 8 04-24-2008 10:18 AM
In FC6 network interface doesn't come up if 'service network restart' command is run rajat Linux - Networking 2 05-03-2007 12:53 AM
command line requires authorization with network server resnostyle Ubuntu 4 09-06-2006 10:12 PM


All times are GMT -5. The time now is 05:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration