Originally posted by gtwilliams
Is there a way to list the last X number of commands from a user?
Make sure they can't modify their ~/.bash_history file on their own (not sure if they are required to have write access to their own .bash_history, anyone??) and run tail commands periodically on the ~/.bash_history file. Although I dont see what your trying to accomplish... If you want to 'stop' them from running commands its harder than that.
It would be more secure to limit what resources they have access to. I feel sorry for colleges/uni's who need to provide a development environment in *nix to the comp sci students. If you give anyone a C compiler, or an Assembler, heck even a Perl interpreter, your basically giving up root access. But what can schools do, these students (me) need to be able develop remotely. Theres just a mutual respect I follow at school and would hope others would too. They give us the development tools we need with the huge possiblity of getting easily rooted. But since they give us the tools to do our 'real' work, nobody does (or at least not many know how in the first place