List commands executed on a server

Hi All, how to list all the commands executed by users on a linux server.... I dont have access to others .bash_history. and i am not root user.. Please help.. Thanks in advance..

Hi,

If you are unable to see the history files of other users (this is correct) then you have limited options.

There is the "who" command that will show you who is actually logged on and the "ps" command that you can use to see what is "currently" running on the system.

Regards

Dave

Thanks Dave, this looks good to current users.. but i need to know what commands were run yesterday. i suspect that user (dont know who) has ran a command and deleted a directory and few other files and the server and db was hung. pls suggest Thanks in advance!!

If you don't have those permissions by default, that will be for a reason. If you now have good reasons for the research, the system admins will help you by either looking themselves or (temporarily?) granting the neccessary privileges.

Hi,

If you think that a dirctory has been deleted, either by mistake or maliciosly - then you'll need to take this to the systems admins. You could request that people send you the output from the "history" command.

But it would be better to let the systems admins do their job, find out why or how the directory was deleted - if it was. Then they should provide user guidance and if required education.

Regards

Dave

Okay... I thought to give a try and wanted to learn... Thank you ..!!

There is nothing to learn, given the circumstances. There are certain system administration privileges and they are given to certain persons - all that for a reason! If you do not have these privileges you either need to get them (temporarily or permanent) or you should not get them.

In other words: get root privileges and you are able to exercise them or don't get root privileges and subsequently don't exercise them. It would only mean that the system is poorly set up if you could do something which should only be available to root without actually being root.

UNIX systems (and Linux systems in this respect are UNIX systems too) are very secure designwise. It is possible to set up a UNIX system with poor security, but all the means to get a very secure system are there and can be used if the owner of a system wants that. Even the default setup of systems is - designwise - secure. What you wanted would be a severe breach of security. It is possible to get that but only if the system is very poorly set up and some default security means are purposefully worked over to allow for that mode of operation.

I hope this helps.

bakunin