FTP Server Login Details Script

Simple yet powerful shell script to check the FTP server login details. The script generates ftp server accessing reports upon execution.

Features

  • Used to check ftp login details.
  • Just copy the code and use it in your command line.
  • Execute the script as a root user and find out the login details.

Downloads

#------------------
Script by hscripts.com
------------------# #-----------------
Copywrite of HIOXINDIA
------------------# #--------------
More scripts @www.hscripts.com
---------------#
awk -F: '{ if($3>=500) print $1 }' /etc/passwd > userslist.txt ddm=$IFS IFS=" " dt=`date +%d` if [ $dt -gt 9 ];then logdate=`date | cut -d" " -f2,3` else logdate=`date | cut -d" " -f2,3,4` fi nolines=`cat userslist.txt | wc -l` lineno=1 echo > ftprep.txt while [ $lineno -lt $nolines ] || [ $lineno -eq $nolines ] do
user=`sed -n "${lineno}p" userslist.txt`
lineno=`expr $lineno + 1`
nologs=`cat /var/log/messages | grep 'pure-ftp' | grep "$logdate" | grep $user | grep 'logged in' | wc -l`
if [ $nologs -gt 0 ]; then
echo -e $user '\t' $nologs times >> ftprep.txt
fi done hostname=`hostname` email='support@hioxindia.com' (echo FTP Login Report;echo ----------------------;sort
+1 -2 -n -r ftprep.txt) | mail -s "FTP report for $hostname" $email
#------------ Script by hscripts.com -------------------------#

  • Release Date - 06-04-2010
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to support@hscripts.com

Usage

  • Copy the above code and save it with .sh extension
  • This script is used in server side only.
  • Execute the shell script as root user with the filename sh filename.sh.
  • Check the FTP server login details.

License

Other Scripts


Ask Questions

Ask Question