I have a linux box on amazon aws EC2. I can view the bash_history user here:
/home/ec2-user/.bash_history
However, when I root in:
sudo -s
I do not get root bash_history. How can I browse / find bash_history for admin user?
Thanks Brett
You can run the history command to view the current user history.
Here is a quick way:
sudo less /root/.bash_history
When you "sudo -s", you apparently get the .bash_history of the original account because $ HOME does not change.
Try setting $ HOME to ~ root before you sudo -s.
Enable logging in sudo by inserting it with visudo
Defaults logfile=/var/log/sudo.log
that do not have text nodes in jQuery - javascript