Linux LOG 全紀錄?



贊助商連結


purple
2002-02-05, 03:33 PM
請問大家:在linux中(現在是用RH7.2),在不計成本的情況下,想要紀錄所有user登入後執行的指令該怎麼做?

我是這樣做過:
一、內容如下:(先建一個檔/bin/.bk_history)
echo "$USER last login time is ... " > $HOME/.diff_history
cat $HOME/.login_date >> $HOME/.diff_history
diff $HOME/.bash_history $HOME/.bash_history.1 >> $HOME/.diff_history
rm -f $HOME/.bash_history.1
cp $HOME/.bash_history $HOME/.bash_history.1
mail -s $USER’ last time login history’ [email protected] < $HOME/.diff_history
date > $HOME/.login_date
二、修改/etc/bashrc -> 加一行 /bin/.bk_history

一開始是正常,可是後來以一般user telnet時卻出現
cannot modify limit operation not permitted
重開機後更出現 bash: fork: Resource temporarily unavaiable 然後就不動了,請問應如
何處理...謝謝