Saturday 19 January 2013

Windows 7 Annoying Bug: Explorer doesn’t refresh automatically when Create/delete/move any file/folder

Post : Windows 7 Annoying Bug: Explorer doesn’t refresh automatically when Create/delete/move any file/folder
URL : http://aacable.wordpress.com/2013/01/04/windows-7-annoying-bug-explorer-doesnt-refresh-automatically-when-createdeletemove-any-filefolder/
Posted : January 4, 2013 at 11:42 AM
Author : Syed Jahanzaib / Pinochio~:)
Tags : win7 auto refresh problem, windows 7 explorer auto refresh not working
Categories : Microsoft Related
Today I found an annoying Bug in Windows 7 (Win7 Professional x86).
When a user try to Create / Delete/ Move any file from the Desktop, it still shows at desktop and when the user press F5 , it instantly appears/disappears, seems like windows Explorer auto refresh not working properly.
This resolved the issue for me:
Go to
Tools / Folder Options / General Tab,
and at  the bottom, in the 'Navigation Pane', make sure 'Show all folders' and 'Automatically expand to current folder' are checked.
As showed in the image below . . .
http://aacable.files.wordpress.com/2013/01/show-files.png&h=472
.
http://aacable.files.wordpress.com/2013/01/show-files2.png&h=470 .
.











DynamicDNS client for windows

Post : DynamicDNS client for windows
URL : http://aacable.wordpress.com/2013/01/03/dynamicdns-client-for-windows/
Posted : January 3, 2013 at 12:56 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : dynamicdns client for windows
Categories : Microsoft Related
A friend of mine asked me howto configure DDNS client in Windows, so he ca remotely access his PC from the remote location, In my previous article  at
http://aacable.wordpress.com/tag/aacable-dynamicdns/
I described howto howto configure DynamicDNS (changeip.com) on Mikrotik  for remote management,but in this following short guide I will tell you how you can configure dynamicdns on windows using the ddns client.
To configure dynamicdns client (changeip.com) on windows base OS, First create your account at changeip.com (its well described at http://aacable.wordpress.com/tag/aacable-dynamicdns/)
After your account is created, now  download and install dynamic dns client (known as homingbeacon) from following location
http://www.changeip.com/dns/homingbeacon/default.aspx (http://www.changeip.com/dns/homingbeacon/default.aspx)
Installation is fairly simple. Just clicking few next next :)
After installation is done, execute "The HomingBeacon Console" from the windows start menu. After its open , click on 'I already have changeip.com account'  (If you don't already have the account, you can create it from the web or clicking on ') am a new changeip.com customer'
As showed in the image below . . .
http://aacable.files.wordpress.com/2013/01/1-pic1.png&h=183
.
.
Now Enter your changeip.com account id with password that you already created earlier.
As showed in the image below . . .
http://aacable.files.wordpress.com/2013/01/2-enter-id-password.png&h=222 Click on Save & Close.
.
.
It will update the public IP of your WAN to your account at changeip.com
As showed in the image below . . .
http://aacable.files.wordpress.com/2013/01/3-update.png&h=275
.
Verify it by going to your changeip.com account, and see if the ip is updated properly. Now its time to configure your DSL router to create port forwarding rule, so required connections can be made from remote location.
For example you want to host HTTP Server on your local PC and want to access it remotely, open your DSL Router Page, and
Login to your dsl modem control panel.
As showed in the image below . . .
http://aacable.files.wordpress.com/2013/01/4-add-nat-in-dsl.png&h=125 .
.
http://aacable.files.wordpress.com/2013/01/5-add-nat-rule.png&h=155
.
.


























Mikrotik: Netwatch Script to Detect Target Server Link & Act Accordingly

Post : Mikrotik: Netwatch Script to Detect Target Server Link & Act Accordingly
URL : http://aacable.wordpress.com/2013/01/10/mikrotik-netwatch-script-to-detect-target-server-link-act-accordingly/
Posted : January 10, 2013 at 9:16 AM
Author : Syed Jahanzaib / Pinochio~:)
Tags : mikrotik link detection script, Mikrotik Netwatch Script, mikrotik scripts
Categories : Mikrotik Related
http://aacable.files.wordpress.com/2013/01/matrix.jpeg&h=198
Someone requested me to create a script that can check Squid Proxy or Target Server Link state from Mikrotik, and if the Squid Proxy / Target Server is not responding, then it should Disable the redirect NAT rule so all load can be handle by Mikrotik.You can modify this script as per your requirements. you can modify it to check WAN link, and if the WAN link is down, it can trigger SMS Script / Sound Alaram, or shift to backup WAN link by enabling diabling ROUTE's or it can also be used to detect any wan link failure detection and change the rules accordingly.
Possibilities are endless.
So here it is.
Adding Comments in Redirect Rule
First add comments in required NAT rule, i.e Rule that redirects port 80 traffic to squid. You can also disable/enable rules based on the numbers, BUT its not recommended BECAUSE if you add any new rule and move it somewhere, all your scripts will disable/enable wrong rules, that is why you have to use find command and get rules this way.
You can use GUI to add comment in the rule, I am showing you an example below . . .
/ip firewall nat
add action=dst-nat chain=dstnat comment="Redirect to SQUID" disabled=no dst-port=80 protocol=tcp to-addresses=192.168.6.1 to-ports=8080
add action=masquerade chain=srcnat comment="Default NAT Rule for Internet Access / zaib" disabled=no to-addresses=0.0.0.0
http://aacable.files.wordpress.com/2013/01/1-nat-rule.png&h=154
Change the host ip address as your local requirements. Its jsut an example to show you.
.
.
Adding Scripts to Enable/Disable Rule
After adding comments in the dst-nt rule, you have to create two scripts that can enable and disable the dst-nat rule. We can name them UP and DOWN.
Copy paste the below scripts on Mikrotik Terminal. It will create two scripts in System/Scripts with the name of UP and DOWN.
/system script
add name=down policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=":log info \"SQUID PROXY link Down. Disabling SQUID NAT Rule s\
    o all load should be handled by Mikrotik alone / zaib\"\r\
    \n/ip firewall nat disable [find comment=\"Redirect to SQUID\"];"
add name=up policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source=\
    ":log info \"SQUID PROXY link is UP. Enabling SQUID NAT Rule / zaib\"\r\
    \n/ip firewall nat enable [find comment=\"Redirect to SQUID\"];"
http://aacable.files.wordpress.com/2013/01/2-script-list.png&h=166
.
Adding NETWATCH to monitor Target Server [Squid] Link Detection
Use the below script to add netwatch entry for squid / target server link detection. It will also add the UP and DOWN script for the appropriate action. For example. When the target server link is down, it will execute script DOWN which will disable the NAT redirect rule , when the target server link is up and working, it will execute the UP script which will re-enable the redirect rule.
/tool netwatch
add comment="Netwatch to Check SQUID Server Link state / zaib" disabled=no down-script="/sys script run down" host=192.168.6.1 interval=5m timeout=1s \
    up-script="/sys script run up"
http://aacable.files.wordpress.com/2013/01/3-squid-link-detection.png&h=130
(Replace the host ip to match your local target server ip)
.
.
Testing Scripts . . .   :)~
Now test the scripts, Unplug the Target Server LAN link, and you will see something like below in the LOG.
http://aacable.files.wordpress.com/2013/01/4-link-down.png&h=228
.
Now plugin the Target Server LAN link, and you will see something like below in the LOG.
http://aacable.files.wordpress.com/2013/01/5-link-up.png&h=231



Add a comment to this post: http://aacable.wordpress.com/2013/01/10/mikrotik-netwatch-script-to-detect-target-server-link-act-accordingly/#respond



























Howto send email from command via Windows using GMAIL account

Post : Howto send email from command via Windows using GMAIL account
URL : http://aacable.wordpress.com/2013/01/10/howto-send-email-from-command-via-windows-using-gmail-account/
Posted : January 10, 2013 at 10:37 AM
Author : Syed Jahanzaib / Pinochio~:)
Tags : email from command, mailsend, send email via command in windows
Categories : Microsoft Related
Send Email from Windows via command prompt using GMAIL Account  :)~
If you want to send email from windows using command prompt using gmail account, first down mailsend utility from following URL and extract it to any folder you like.
http://www.muquit.com/muquit/software/mailsend/mailsend1.16.exe.zip (http://www.muquit.com/muquit/software/mailsend/mailsend1.16.exe.zip extract it to any folder you like.)
Now to send email using command via your GMAIL account, use the below syntax. Remember to change the email addressees and password to match your account details.
mailsend.exe -to aacable@hotmail.com -from your-gmail-id@gmail.com  -ssl -smtp smtp.gmail.com -port 465 -sub "Testing Email via Windows cmd using GMAIL test %time%" -M "This is body text of Testing Email via Windows cmd using GMAIL. %date% %time% sending / zaib." +cc +bc -q -auth-plain -user "your-gmail-id" -pass "yourpass"
To send email with attachment, use the following
mailsend.exe -to aacable@hotmail.com -from your-gmail-id@gmail.com  -ssl -smtp smtp.gmail.com -port 465 -sub "Testing Email via Windows cmd using GMAIL test %time%" -M "This is body text of Testing Email via Windows cmd using GMAIL. %date% %time% sending / zaib." +cc +bc -q -auth-plain -user "your-gmail-id" -pass "yourpass" -attach "c:\test.txt"
It's very handy and useful in many conditions. For example I used it to send daily tape backup log OR daily backup file to my email in the morning by scheduling it.

.
For more info, please read this details guide at
http://www.codeproject.com/Tips/418420/Send-email-from-command-line-using-GMail-account (http://www.codeproject.com/Tips/418420/Send-email-from-command-line-using-GMail-account)
.
















2012 in review [My Blog Report by WP]

Post : 2012 in review [My Blog Report by WP]
URL : http://aacable.wordpress.com/2012/12/31/2012-in-review-my-blog-report-by-wp/
Posted : December 31, 2012 at 8:09 AM
Author : Syed Jahanzaib / Pinochio~:)
Tags : aacable blog report, annual report, blog stats, my stats
Categories : General IT Related
The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.
http://aacable.wordpress.com/2012/annual-report/
Here's an excerpt:
> About 55,000 tourists visit Liechtenstein every year. This blog was viewed about 850,000 times in 2012. If it were Liechtenstein, it would take about 15 years for that many people to see it. Your blog had more visits than a small country in Europe!
Click here to see the complete report. (http://aacable.wordpress.com/2012/annual-report/)
Add a comment to this post: http://aacable.wordpress.com/2012/12/31/2012-in-review-my-blog-report-by-wp/#respond








Howto configure GMAIL as SENDMAIL RELAY :D (Also can be used with RM to send Email Notifications)

Post : Howto configure GMAIL as SENDMAIL RELAY :D (Also can be used with RM to send Email Notifications)
URL : http://aacable.wordpress.com/2012/12/27/howto-configure-gmail-as-sendmail-relay-d-also-can-be-used-with-rm-to-send-email-notifications/
Posted : December 27, 2012 at 3:01 PM
Author : Syed Jahanzaib / Pinochio~:)
Categories : Linux Related
http://aacable.files.wordpress.com/2012/12/gmail-logo.jpg&h=224
If you want to use GMAIL as your sendmail relay server, Use the below configuration.
{I required it to send DMASOFTLAB RADIUS MANAGER Email notifications to all users regarding there service status, account expiry, renewal , various alerts and other info. thats why I wrote this guide, it maybe useful for others too . . Syed Jahanzaib }
OS Used: Ubuntu 10.4
First install Sendmail and its utilities.
apt-get install sendmail mailutils
Now configure signed SSL certificates
mkdir /etc/mail/certs
chmod 700 /etc/mail/certs
cd /etc/mail/certs
openssl dsaparam 1024 -out dsa1024 -out dsa1024.pem
(It will ask you various questiosn , just enter them accordingly, like country code, for Pakistan its PK, and other information you have)
openssl req -x509 -nodes -days 3650 -newkey dsa:dsa1024.pem -out /etc/mail/certs/mycert.pem -keyout /etc/mail/certs/mykey.pem
(It will ask you various questiosn , just enter them accordingly, like country code, for Pakistan its PK, and other information you have)
openssl req -x509 -new -days 3650 -key /etc/mail/certs/mykey.pem -out /etc/mail/certs/mycert.pem
ln -s /etc/mail/certs/mycert.pem /etc/mail/certs/CAcert.pem
chmod 600 /etc/mail/certs/*
cd ..
Now configure gmail SMTP authentication information, This file may be blank, just paste the text showed in green text.
nano  /etc/mail/authinfo
<span style="color: #008000;">AuthInfo:smtp.gmail.com "U:root" "I:USERNAME@gmail.com" "P:PASSWORD"</span>
<span style="color: #008000;">AuthInfo: "U:root" "I:USERNAME@gmail.com" "P:PASSWORD"</span>
<span style="color: #008000;">makemap hash -o /etc/mail/authinfo < /etc/mail/authinfo</span>
Now Add the following configurations at the bottom of sendmail.mc file
nano /etc/mail/sendmail.mc
<span style="color: #008000;">dnl #</span>
<span style="color: #008000;">dnl # SSL Settings</span>
<span style="color: #008000;">define(`CERT_DIR', `MAIL_SETTINGS_DIR`'certs')</span>
<span style="color: #008000;">define(`confCACERT_PATH', `CERT_DIR')</span>
<span style="color: #008000;">define(`confCACERT', `CERT_DIR/CAcert.pem')</span>
<span style="color: #008000;">define(`confSERVER_CERT', `CERT_DIR/mycert.pem')</span>
<span style="color: #008000;">define(`confSERVER_KEY', `CERT_DIR/mykey.pem')</span>
<span style="color: #008000;">define(`confCLIENT_CERT', `CERT_DIR/mycert.pem')</span>
<span style="color: #008000;">define(`confCLIENT_KEY', `CERT_DIR/mykey.pem')</span>
<span style="color: #008000;">dnl #</span>
<span style="color: #008000;">dnl # GMAIL FORWARDING</span>
<span style="color: #008000;">define(`SMART_HOST',`[smtp.gmail.com]')dnl</span>
<span style="color: #008000;">define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl</span>
<span style="color: #008000;">define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl</span>
<span style="color: #008000;">define(`confAUTH_OPTIONS', `A p')dnl</span>
<span style="color: #008000;">TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl</span>
<span style="color: #008000;">define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl</span>
<span style="color: #008000;">FEATURE(`authinfo',`hash -o /etc/mail/authinfo.db')dnl</span>
Now rebuild sendmail config and start the service :D
make -C /etc/mail
service sendmail restart
Test the setup ;)  The Result :~)




















Personnel short notes for BLAT and Delete Files Older then X Days

Post : Personnel short notes for BLAT and Delete Files Older then X Days
URL : http://aacable.wordpress.com/2013/01/10/personnel-short-notes-for-blat-and-delete-files-older-then-x-days/
Posted : January 10, 2013 at 10:50 AM
Author : Syed Jahanzaib / Pinochio~:)
Tags : blat, email using BLAT, forfiles, howto delete files older then x days
Categories : Microsoft Related
To send email from windows command using your local company SMTP , use BLAT tool.
BLAT guide.
A wonderful guide is already available here.
http://cybergav.in/2010/10/28/how-to-send-emails-using-blat/
+++++++++++++++
First Download BLAT from following URL:
http://sourceforge.net/projects/blat/files/Blat%20Full%20Version/32%20bit%20versions/Blat%20v3.0.0/blat300_32.full.zip/download?use_mirror=autoselect (http://sourceforge.net/projects/blat/files/Blat%20Full%20Version/32%20bit%20versions/Blat%20v3.0.0/blat300_32.full.zip/download?use_mirror=autoselect)
Unzip it to any folder you like.
+++++++++++++++
To install SMTP in BLAT use the below command . . .
blat -installSMTP 10.0.0.1  your-user-id@xyz.com.pk  5  25
+++++++++++++++
To send email using blat command, use the below command
blat -s "test mail" -i "test" -to  your-user-id@xyz.com.pk
+++++++++++++++
To send email with attachment of file using blat command, use the below command
blat -s "test mail" -i "Syed Jahanzaib / Admin" -to your-user-id@xyz.com.pk -body "Please see attached file" -attach c:\test.txt
+++++++++++++++
Email/Delete Files OLDER then X days Examples:
CORE EXAMPLE
forfiles -p "C:\test" -s -m *.* -d 0 -c "cmd /c c:\blat\blat.exe -to your-user-id@xyz.com.pk -i myname -s INFRA_LOGS -body INFRA_SERVERS_LOGS -attach @path"
Working EXAMPLE for file_server/ For TAPE BACKUP LOGS
forfiles -p "C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data" -s -m *.* -d 0 -c "cmd /c c:\blat\blat.exe -to your-user-id@xyz.com.pk -i myname -s INFRA_LOGS -body INFRA_SERVERS_LOGS -attach @path"
TO show (DELETE removed from syntax) FILES OLDER THEN X DAYS (in the below example its 30 days)
FORFILES /p c:\temp /d -30 /m * /c "cmd /c echo @file"
TO show (DELETE removed from syntax) FILES For TODAY
FORFILES /p c:\temp /d 0 /m * /c "cmd /c echo @file"
Windows 2003/7/2008 already have forfiles installed. but you can download it from here http://www.ipass.net/davesisk/forfiles.zip




















Active Directory DSQUERY & Miscellenous Commands with Syntax

Post : Active Directory DSQUERY &amp; Miscellenous Commands with Syntax
URL : http://aacable.wordpress.com/2013/01/16/active-directory-dsquery-miscellenous-commands-with-syntax/
Posted : January 16, 2013 at 2:02 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : dsget
Categories : Uncategorized
Recently We were asked by the Auditors to provide some data of Active Directory for yearly Audit purpose. I already have few scripts that saved a lot of time. I also linked these scripts with the Linux base WEBMIN, so they can be called by nice GUI as showed in the example below.
http://aacable.files.wordpress.com/2013/01/webmin-1.png
.
<How to link Linux base scritps with the webmin> (http://aacable.wordpress.com/2012/04/11/howto-manage-active-directory-using-webminlinux-customized-panel/)
Following are scripts
Show All users in your domain
dsquery * dc=yourdomainname -filter "(&amp;(objectCategory=Person)(objectClass=User))" -limit 0
Show All Users Created Since 1st January, 2012 till date
dsquery * dc=yourdomainname -filter "(&amp;(objectCategory=Person)(objectClass=User)(whenCreated&gt;=20120101000000.0Z))"
Show Users For Specific Period (Jan-2012 till Dec-2012)
e.g: Display Users Created from 1st January 2012 till 31st December 2012 (1 Year) Only.
dsquery * dc=yourdomainname -filter "(&amp;(objectCategory=Person)(objectClass=User)(whenCreated&gt;=20120101000000.0Z-)(whenCreated&lt;=20121231000000.0Z-))"
> = greater then
< = less then
~ = approx
= equals

Miscellaneous commands . . .Show All Users Info (Active/Non Active)
dsquery user -limit 0 | dsget user -dn -disabled
Show Inactive Users Only (Users that haven't logged on since last 2 weeks)
dsquery user "dc=Your_Domain_Name" -inactive 2
Show DISABLED Users Only
dsquery user -disabled | dsget user -display -email -dept -title
Show ACTIVE Users Only
dsquery * -filter "(&(sAMAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" -limit 0 | dsget user -display -email -dept -title
Show Users from Specific Group Only
dsquery group DC=yourdomainname -name "Type Group Name" | dsget group -members |sort |dsget user -display -email -dept -title
Show Only Specific User Details
Net user USERID /domain




















Personnel notes on Password Protecting Apache folder/alias + Disable Apache Directory Browsing

Post : Personnel notes on Password Protecting Apache folder/alias + Disable Apache Directory Browsing
URL : http://aacable.wordpress.com/2012/12/27/personnel-notes-on-password-protecting-apache-folderalias-disable-apache-directory-browsing/
Posted : December 27, 2012 at 12:54 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : .htaccess, .htpasswd, create alias in apache, disable directory browsing in apache, password protect apache folder
Categories : Linux Related
http://aacable.files.wordpress.com/2012/12/password.jpg&h=125
> Howto Disable DIRECTORY BROWSING in apache2
To Disable directory browsing in Apache (In Ubuntu its apache2), Remove the following directive from your required folder.
Indexes
For example,  you want to remove directory browsing for /var/www/backup folder.
Edit the below file /etc/apache2/sites-enabled/000-default by using following command
nano /etc/apache2/sites-enabled/000-default
The Default config is below.
Alias /backup /var/www/backup
<Directory /var/www/backup>
DirectoryIndex index.html
Options Includes Indexes FollowSymLinks MultiViews
</Directory>
Change it below
Alias /backup /var/www/backup
<Directory /var/www/backup>
#DirectoryIndex index.html
Options Includes FollowSymLinks MultiViews
</Directory>
Save & Exit , then Restart APACHE Service by
service apache2 restart
============================================================
> Howto create Alias/Virtual Folder
To create Alias/VF, for example /var/www/backup
Edit the below file, and add the data as showed below
nano /etc/apache2/sites-enabled/000-default
Alias /backup /var/www/backup
<Directory /var/www/backup>
DirectoryIndex index.html # Change as per requirement
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride None
order allow,deny
allow from all
</Directory>
Save & Exit , then Restart APACHE Service by
service apache2 restart
============================================================
> Howto Password Protect Apache Folder with .htaccess
If you want to password protect specific folder in Apache so un authorized users cannot access it, use the following method. There are other better methods available, You can follow them for best practices. I just did it this way.
First Create password file
htpasswd -c /etc/apache2/passwd zaibtest
(Replace zaibtest with your required username, It will ask you for password, enter password you like to set for user zaibtest. Also you can save this file anywhere you like)
Now protect your required folder, for example I want to protect /var/www/backup folder, then use the following directives in in /etc/apache2/sites-enabled/000-default
nano /etc/apache2/sites-enabled/000-default
Alias /backup /var/www/backup
<Directory /var/www/backup>
#DirectoryIndex user.php
AuthType Basic
AuthName "Please enter valid user password to access Zaib's Data"
AuthUserFile /etc/apache2/passwd
Require valid-user
Options Includes Indexes FollowSymLinks MultiViews
AllowOverride ALL
order allow,deny
allow from all
</Directory>
Save & Exit , then Restart APACHE Service by
service apache2 restart
Now try to access the folder, it will ask you the password.
http://aacable.files.wordpress.com/2012/12/asking-password.png&h=225
.
After providing valid id password, you can access your folder. (I use it to download backup data from remote location)
http://aacable.files.wordpress.com/2012/12/access-granted.png&h=268

































Sending Payment Reminder / Service Status SMS to Users via GAMMU using CLI/GUI

Post : Sending Payment Reminder / Service Status SMS to Users via GAMMU using CLI/GUI
URL : http://aacable.wordpress.com/2012/12/24/sending-payment-reminder-service-status-sms-to-users-via-gammu-using-cligui/
Posted : December 24, 2012 at 2:43 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : gammu sms, payment reminder via sms, send sms to users
Categories : Linux Related
http://aacable.files.wordpress.com/2012/12/mobile.gif&h=356
Following is a short guide on how you can create your own SMS panel to send SMS to users about various Events using CLI or GUI method.
For example Payment Reminder, Service Down/Up Alert, and any other message you like to convey to all users.
If you have some prior experience with the Linux/SMS tools, I am sure you will ask why to do so much manual work if you already have open source free tools like smsplay, kannel and many others available , the answer is YES the pre made tools/applications have very nice GUI and and have other functions as well, you simply have to install it by single command and that's it ready to use, but I always like to build my own solution rather then relying on the pre made applications, This way I can twist and modify the method as per my requirements. & yes its fun to play with the code and you feel much confident, happy and relaxed if you manage to create your own working solution that can fulfill your requirement.
Just FYI, DMASOFTLAB Radius Manager 4.1.x will have the function to send account expiry warning SMS before account expires.
.
Hardware Required:
# GSM Mobile / MODEM
(I used TELTONIKA GSM USB Device in this example, Picture is attached below . . .)
http://aacable.files.wordpress.com/2012/11/teltonika.jpg&h=67
Software Required:
# Ubuntu 10.x or any flavor of Linux you like to use.
# GAMMU or GNOKII (you can install gammu by apt-get install gammu )
(A very good guide for GAMMU installation & configuration is available here
http://techspalace.blogspot.com/2012/02/send-sms-using-gammu-command-line-tool.html
http://pierky.wordpress.com/2011/10/28/zabbix-send-sms-using-gammu-smsd/

Connect your GSM modem to your Linux Box via USB,
Make sure it is detected properly by Identifying it using DMESG command
dmesg | grep tty
(You may see following information if device is detected OK, As showed below)
http://aacable.files.wordpress.com/2012/12/1-detect-modem.png&h=256
As you can see that the modem have been detected as USB ACM DEVICE ttyACM0
Now run gammu config by
gammu-config
It will ask you that gammu configuration file exists, click YES to continue
Now configuration box will open, Select the PORT and EDIT & type your port name that is detected in the dmesg command.
http://aacable.files.wordpress.com/2012/12/2-port.png&h=277 .
http://aacable.files.wordpress.com/2012/12/3-portname.png&h=300
Click on OK , then SAVE and EXIT
Now identify it by using following command.
gammu --identify
(You may see following information if its connected OK , As showed below)
> root@zaib-desktop:/sms# gammu --identify
> Manufacturer         :   Teltonika
> Model                      :   unknown (TM3 EDGE)
> Firmware                :   05.41.02
> IMEI                       :   3523870xxxxxxxx
> SIM IMSI               :   410012xxxxxxx62
Test the configuration by sending SMS to your number using CLI method. Use the below command to send sms to your mobile.
> echo "Zaib Test Message" | gammu sendsms TEXT 03333021909
If you don't see any error message and receive the message to your number, then we are good to GO . . .
========================================================
TIP:
You can also use WAMMUwhich is a nice GUI frontend for GAMMU. Using it you can perform following functions easily.
Using wammu you can read/edit/delete/copy your contacts, to-do, calendar you can read/create/save/send and Backup your sms. Some type of phone supports file sending, display message including pictures and ringtones playback. Support for backup and import in various formats (vCard, vCalendar, iCalendar, gammu own backup,...) . Export messages to mail (IMAP4, maildir and mailbox storages are supported.
To install wammu, simply issue below command from GUI terminal.
apt-get install wammu
After installation completes, Goto Applications / Accessories / >Wammu
Run its configuration wizard to detect the modem and start using it :)
http://aacable.files.wordpress.com/2012/12/wammu-on-linux.png&h=265
========================================================
.
Download following sms-panel-zaib.rar (http://www.mediafire.com/?f77465ogydpe4fp) file from following location , and extract all files in a new folder /sms

http://www.mediafire.com/?f77465ogydpe4fp (http://www.mediafire.com/?f77465ogydpe4fp)
Following are the contents of /sms (after extracting)
root@zaib-desktop:~# ls /sms
start = > It executes all the scripts in order, First init , then startsms
data     => Contains Users Mobile Numbers and Names, Sample Numbers are included. Modify it as per your requirements
path => Contains all the paths for the scripts/dir
init      => This script extracts mobile nos and data from various sources and create temporarily dunp files
message => Contains Message that will be sent to users, Modify it as per your requirements
mobile.no = > Automatically created via script which contain mobile nos. only
startsm => This script actually sends sms using gammu
=============================================
Now first edit data file which contains the mobile numbers.
nano /sms/data
Type your user mobile number in the following manner
> # User's Mobile Numbers and there Names
> 03333021909 # Syed Jahanzaib-Admin No.
> 03331234567 # A-420, Lake View Cottages :d
> 03211122334 # X-20, A One Villas Bungalows :p
Now SAVE and EXIT ( By pressing CTRL+O , then ENTER, then CTRL+X )
Edit the message file, it will contain the message that will be delivered to users.
nano /sms/message
Now type your required message. For example:
> Dear User,
> Due to some scheduled maintenance work, Internet service will not be available from 3:00pm till 5:00pm on 25th December, 2012.
>
> Thank you for your co-operation & Sorry for the inconvenience.
>
> Regard's
> AA Networks (Pvt) Ltd. / zaib :)
Now SAVE and EXIT ( By pressing CTRL+O , then ENTER, then CTRL+X )
1-SEND SMS TO ALL USERS USING CLI
Now type /sms/start to execute the whole process.
It will first execute init script which will extract data from the paths / files,
Then it will start sendsms script which will actually send the sms to all the numbers fetched from init scripts (Users mobile numbers are mentioned in the data file)
2- SEND SMS TO ALL USERS USING  GUI  VIA WEBMIN
To use Customize GUI Panel, through which we can manage users mobile numbers list, and send sms to this list, You have to first install WEBMIN. which is a very nice multi purpose GUI tool to manage various Linux components
If you are using UBUNTU, you can install it via apt-get
First edit sources file, so that apt-get can fetch data from webmin directly.
nano /etc/apt/sources.list
Paste the following lines at end.
deb http://download.webmin.com/download/repository sarge contrib
deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib
Save & Exit.
Now execute following commands to install GPG key with which the repository is signed. Use the below command.
cd /root
wget http://www.webmin.com/jcameron-key.asc
apt-key
add jcameron-key.asc
Now you will be able to install with the commands :
apt-get update
apt-get install webmin
after successful install , you can access it using the URL  it showed you after successful message.Eample::
https://10.0.0.1:10000
[Use your root ID & Password to Login],
After successful login, you will see following screen . . .
http://aacable.files.wordpress.com/2012/12/webmin.png&h=173 .
CREATE MENU'S & LINK THEM WITH THE COMMANDS in /SMS
Now goto OTHERS / CUSTOM COMMANDS
Click on Create A New File Editor
In Description, Type any EDIT USERS MOBILE NUMBER
in File to EDIT , tpye the mobile no file name  /sms/data
Click on SAVE
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/6-create-file-editor.png&h=188 .
Congrats, you have created a file editor which can edit the users mobile numbers,
After SAVING above file editor, you will be redirected back to main menu,
Now we will create a new file editor, which will actually send the message you type in the available box.
http://aacable.files.wordpress.com/2012/12/7-create-file-editor-for-message.png&h=81 .
In Description, Type any Send SMS to ALL
In File to EDIT , tpye the message file name  /sms/message
In Command to run after saving, type /sms/start
Click on SAVE
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/8-create-file-editor-for-message-2.png&h=225
.
.
Now you will have the menu  something like below.
http://aacable.files.wordpress.com/2012/12/9-main-menu1.png&h=194 .
Now Click on the Edit Users Mobile Nos. button
& add the required mobile numbers in following manner.
http://aacable.files.wordpress.com/2012/12/10-edit-mobile-numbers.png&h=180 Click on SAVE to save the entries in /sms/data.
.
Now to send SMS to the list, Click on Send SMS to ALL
Type the message in the box, and click on SAVE, after saving, it will auto execute the /sms/start script which will start sending the message you just typed to the list. It may take long time to send SMS if you have large numbers of List. In my case, it took 3-4 Seconds per SMS.
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/11-send-sms.png&h=481
.
You can schedule various events alerts in CRON job by using pre defined message templates.
To be continued . . .