OpenVZ Forum


Home » General » Support » *SOLVED* command history
*SOLVED* command history [message #22180] Tue, 23 October 2007 03:06 Go to next message
nethubonline is currently offline  nethubonline
Messages: 26
Registered: October 2007
Junior Member
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


https://www.nethub.com.hk (VPS Hosting Provider in Hong Kong)

[Updated on: Fri, 26 October 2007 05:33] by Moderator

Report message to a moderator

Re: command history [message #22210 is a reply to message #22180] Tue, 23 October 2007 14:35 Go to previous messageGo to next message
khorenko is currently offline  khorenko
Messages: 533
Registered: January 2006
Location: Moscow, Russia
Senior Member
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.


If your problem is solved - please, report it!
It's even more important than reporting the problem itself...
Re: command history [message #22255 is a reply to message #22180] Wed, 24 October 2007 06:43 Go to previous messageGo to next message
rickb is currently offline  rickb
Messages: 368
Registered: October 2006
Senior Member
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).



-------------
Common Terms I post with: http://wiki.openvz.org/Category:Definitions

UBC. Learn it, love it, live it: http://wiki.openvz.org/Proc/user_beancounters
Re: command history [message #22265 is a reply to message #22210] Wed, 24 October 2007 10:29 Go to previous messageGo to next message
nethubonline is currently offline  nethubonline
Messages: 26
Registered: October 2007
Junior Member
>> 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.


https://www.nethub.com.hk (VPS Hosting Provider in Hong Kong)
Re: command history [message #22324 is a reply to message #22265] Thu, 25 October 2007 13:53 Go to previous message
Valmont is currently offline  Valmont
Messages: 225
Registered: September 2005
Senior Member
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.
Previous Topic: Numerous segmentation faults on VE start
Next Topic: How to create a SUSE Enterprise Server 10 SP1 ostemplate?
Goto Forum:
  


Current Time: Sun Sep 15 22:53:42 GMT 2024

Total time taken to generate the page: 0.03816 seconds