OpenVZ Forum - RDF feed
type: channel
items: *SOLVED* command history
items: Re: command history

*SOLVED* command history
type: item
description: 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
creator: nethubonline
date: 2007-10-23T03:06:08-00:00

Re: command history
type: item
description: 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.
creator: khorenko
date: 2007-10-23T14:35:39-00:00

Re: command history
type: item
description: 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).
creator: rickb
date: 2007-10-24T06:43:16-00:00

Re: command history
type: item
description: >> 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.
creator: nethubonline
date: 2007-10-24T10:29:42-00:00

Re: command history
type: item
description: 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.
creator: Valmont
date: 2007-10-25T13:53:25-00:00