Posts

Showing posts with the label linux

Linux ISP Hosting Server Setup

Installation of Linux Server capable of the following for small to large companies - Mail Server - Web Server - Ftp Server - Raid 1 Configuration - Auto Backup Configuration - Multi Tenant setup - With graphical interface for easy configuration - Accepting Paypal and Xoom - Accepting Remote Installation (provided server has minimal OS installed with public ip address and ssh access) Contact: 09288057356 Email: jmazaredo@gmail.com WWW: http://mazaredo.com

Script to report linux login yesterday

Create a script for yesterday.. yesterday.sh #jmazaredo 4-19-2016 #Get the date month and date cut the necessary date ystd=$(date --date yesterday | cut -d' ' -f2,3) tdy=$(date --date today | cut -d' ' -f2,3) #show the date yesterday Month and date echo ${ystd} #show the date today Month and date echo ${tdy} #grep the date try checking the tdy since you may have no login yesterday last | grep "$tdy" Crontab Entry email it 8 * * * /user/yesterday.sh | mail -s "Last Login Yesterday" me@example.net

du cut tr send email notification overquota users in an old mail system linux accounts

Task : to email old users that they have exceeded 100m disk space The problem is that the folder where the user is deep inside 2 folders so "du" is used. tr is used to remove characters cut to get the coloumn http://stackoverflow.com/questions/11049748/how-to-cut-multiple-columns-from-several-files-and-print-the-ouput-to-different   cd /backup/home/virtual du -m --max-depth=2  | tr './' ' ' | cut -d' '  -f 1,4 | while read space user do    if [ $space -gt 100 ]                     then         mail -s "Your account is using over 100MB Disk Space" $user <<MAIL  $user: You are now using $space MB in your home directory. The only total amount of diskspace allowed is 100 MB. MAIL  fi done