summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepti Kulkarni <deepti@vyatta.com>2010-08-17 20:31:29 +0000
committerAn-Cheng Huang <ancheng@vyatta.com>2010-08-18 11:42:10 -0700
commita6ce8e0c0122bed8cba777ac30b148ae6846a8f3 (patch)
treea5040514e9bfc235299ebf656edf9f791a78c554
parentb8106b5268d5e6c00065f212219fc958cd623572 (diff)
downloadvyatta-op-a6ce8e0c0122bed8cba777ac30b148ae6846a8f3.tar.gz
vyatta-op-a6ce8e0c0122bed8cba777ac30b148ae6846a8f3.zip
Allow non-root user extract root's bash history. Added "sudo".
(cherry picked from commit 8d3eed868fee96d79ad044f10365c1e328fbf823)
-rwxr-xr-xfunctions/tech-support2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/tech-support b/functions/tech-support
index 4fff28c..331cde4 100755
--- a/functions/tech-support
+++ b/functions/tech-support
@@ -347,7 +347,7 @@ for user in "${cfg_users[@]}"; do
root) file="/root/.bash_history";;
*) file="/home/$user/.bash_history";;
esac;
- cat $file | gawk '/^#[0-9]*/ {t = substr($0,2); next} {print strftime("%FT%T%z", t) " " $0}' | sort -u
+ sudo cat $file | gawk '/^#[0-9]*/ {t = substr($0,2); next} {print strftime("%FT%T%z", t) " " $0}' | sort -u
done
header Login History