jailkit-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Jailkit-users] At each login, how can jailkit write the ip log in the /


From: yellow protoss
Subject: [Jailkit-users] At each login, how can jailkit write the ip log in the /root/
Date: Wed, 7 May 2008 01:05:50 +0200

Hello,

I am using this code to log the IP and further informations. I would like that at each login, how can jailkit write the ip log in the /root/.
I know that auth.log does some job, but I would like to get more inforamtions ... and pplay festival, and surely not overall the pc with any kind of wait or watch or while [ 1 ]. ;) (that's kind of normal.. if we look for cpu saving ) :)

cat /usr/sbin/myjkmodifiedchrootsh
#!/bin/sh
echo "$(date): in" >> ~/login-tracing
netstat -nat >> ~/login-tracing
netstat -nat | grep 22  | awk '{ print $4}' | awk ' { n=split($0,vk,":") ; print vk[4]  }  ' | tail -n 1 | xargs host >> ~/login-tracing   #not working
echo "User $LOGNAME logging in." | festival --tts
/usr/sbin/jk_chrootsh
echo "Logging out $LOGNAME ..."
echo "User $LOGNAME logging out." | festival --tts
echo "$(date): out" >> ~/login-tracing

Thank you
Happy tux,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]