Hi all, i found that i could not check the shell command history of VE, so it is hard to find out what had be issued by VE user to make down the server. Is there any method to enable the VE command history? Thx all
Hi, i might misunderstand you, but shell history is enabled inside a VE by default. History is saved in .bash_history (or other file if you use another shell) and if a user doesn't change HISTFILE, HISTSIZE/HISTFILESIZE environment variables the history will be logged. i'd note that this is true if a user logged into the VE via ssh, not via "vzctl enter". "vzctl enter" sessions are not logged and these sessions are not a "user" shell sessions. Best regards, Konstantin.
There is an bash replacement RPM with syslog logging. But theres always workarounds if the admin doesnt want his activity logged (other shell, remove logs).
>> i'd note that this is true if a user logged into the VE via ssh, not via "vzctl enter". "vzctl enter" sessions are not logged and these sessions are not a "user" shell sessions. wow, the truth is like this, thank you for your note which make me clear why i always cannot see history, really thanks a lot.
Yeah, "vzctl enter" is just "backdor" and should not be used in normal situation to admin vps. But if it realy needed, then you can do su - after vzctl enter to setup variables of environment, so you could use history and other things as usualy.