How to Change Logos in Radius Manager


Changing Logo in Radius Manager
Path Details
Ubuntu
/var/www/radiusmanager/images
CentOS
/var/www/html/radiusmanager/images

Image Files are Below
radmanlogo_small.gif
main1_01.gif
main1_02.gif
main1_03.gif

Copy Your Company Logo to radmanlogo_small.gif & main1_01.gif
cp Your Company Logo radmanlogo_small.gif
cp Your Company Logo main1_01.gif

Re-Starting Web Service
Ubuntu
sudo service apache2 restart
CentOS
/etc/init.d/httpd restart

Check Your DMA Radius Admin Page
http://IP-Address/radiusmanager/admin.php

Advertisements

Deleting Old Years Users Data Script


#!/bin/bash

SET @year = “2013”;

Create Temporary radacct Table
CREATE TABLE radacct2 (
username varchar(64) NOT NULL default ”,
acctsessiontime int(12) default NULL,
acctinputoctets bigint(20) default NULL,
acctoutputoctets bigint(20) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Cumulate Datas From Previous Years From Radacct(radacct2)
SET @yearlike = CONCAT(@year, “%”);
SET @cumuldatetime = CONCAT(@year, “-12-31 23:59:59”);

INSERT INTO radacct2 (username, acctsessiontime, acctinputoctets, acctoutputoctets)
SELECT username, SUM(acctsessiontime), SUM(acctinputoctets), SUM(acctoutputoctets)
FROM radacct
WHERE acctstarttime LIKE @yearlike
GROUP BY username;

Delete all Data From radacct Specified Year
DELETE FROM radacct WHERE acctstarttime LIKE @yearlike;

Create Temporary rm_radacct Table
CREATE TABLE rm_radacct2 (
username varchar(64) NOT NULL default ”,
acctsessiontime int(12) default NULL,
ulbytes bigint(20) default NULL,
dlbytes bigint(20) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Cumulate Datas From Previous Years From rm_radacct(rm_radacct2)
SET @yearlike = CONCAT(@year, “%”);
SET @cumuldatetime = CONCAT(@year, “-12-31 23:59:59”);

INSERT INTO rm_radacct2 (username, acctsessiontime, ulbytes, dlbytes)
SELECT username, SUM(acctsessiontime), SUM(ulbytes), SUM(dlbytes)
FROM rm_radacct
WHERE acctstarttime LIKE @yearlike
GROUP BY username;

Delete all Data From rm_radacct Specified Year
DELETE FROM rm_radacct WHERE acctstarttime LIKE @yearlike;

Substract Deleted Values (radacct2) From radacct
UPDATE rm_users, radacct2
SET rm_users.uptimelimit = rm_users.uptimelimit – radacct2.acctsessiontime,
rm_users.uplimit     = rm_users.uplimit     – radacct2.acctinputoctets,
rm_users.downlimit   = rm_users.downlimit   – radacct2.acctoutputoctets,
rm_users.comblimit   = rm_users.comblimit   – radacct2.acctoutputoctets – radacct2.acctinputoctets
WHERE rm_users.username = radacct2.username;

Substract Deleted Values (rm_radacct2) From radacct
UPDATE rm_users, rm_radacct2
SET rm_users.uptimelimit = rm_users.uptimelimit + rm_radacct2.acctsessiontime,
rm_users.uplimit     = rm_users.uplimit     + rm_radacct2.ulbytes,
rm_users.downlimit   = rm_users.downlimit   + rm_radacct2.dlbytes,
rm_users.comblimit   = rm_users.comblimit   + rm_radacct2.dlbytes + rm_radacct2.ulbytes
WHERE rm_users.username = rm_radacct2.username;

Drop Temporary Table
DROP TABLE radacct2;
DROP TABLE rm_radacct2;

Adding Search Button in Radius Manager


Add Code Below “<td>{CONTENT} </td>”

&nbsp;<table border=”1″ width=”100%”>
<tr>
<td><table width=”100%” border=”0″ cellpadding=”5″ cellspacing=”0″ class=”tb-bg”>
<tr>
<td><form name=”form2″ method=”post” action=”admin.php?cont=list_users”>
<p class=”title2″><font color=”#000000″> User Search Database </font></p>
<table border=”0″ align=”center” cellpadding=”2″ cellspacing=”2″ width=”441″>
<tr>
<td nowrap class=”normal” width=”112″>

</td>
<td class=”normal”>&nbsp;<input name=”username” type=”text” class=”normal” id=”username” size=”29″ maxlength=”32″></td>
</tr>
</table>
<p align=”center”>
<input type=”submit” name=”Submit2″ value=”{FNDUSR23}”>
</p>
</form> </td>
</tr>
</table></td>

Check Your Search Button
http://IP-Address/radiusmanager/admin.php

search button

Radius Server is not Responding


NAS IP address or secret key is not defined in ACP (Radius Manager also updates clients.conf)
To determine the correct NAS IP1

Check NAS IP
Check Secret Name

2

Stop Freeradius Service
service radiusd stop
(or)
ps ax|grep radius
kill [pid]

Testing Freeradius
radiusd -X

Service Freeradius Details
Service radius stop  [Failed]
Service radius start [Failed]

Freeradius Status
If Service [Failed] Freeradius is not working

Re-Installation of Freeradius
Download Freeradius
www.dmasoftlab.com/cont/download/freeradius-server-2.2.0-dma-patch-2.tar.gz
cd freeradius-server-2.2.0
./configure
make
make install

Blank Screen Due to PHP Issue


Check PHP Version
php -v

Download & Install Ioncube
32 Bit Files
cd /usr/local
wget http://www.dmasoftlab.com/cont/download/ioncube_loaders_lin_x86.tar.gz
tar -xvf ioncube_loaders_lin_x86.tar.gz
cd /ioncube

64 Bit Files
cd /usr/local
wget http://www.dmasoftlab.com/cont/download/ioncube_loaders_lin_x86-64.tar.gz
tar -xvf ioncube_loaders_lin_x86-64.tar.gz
cd /ioncube

Check Ioncube Files in /usr/local
/usr/local/ioncube/loader-wizard.php

Copy loader File to Web Root
sudo cp loader-wizard.php /var/www (Ubuntu)
sudo cp loader-wizard.php /var/www/html/ (CentOS)

Edit php.ini Configure File & Add Ioncube File extension location
Ubuntu Version
vim /etc/php5/apache2/php.ini
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so
CentOS Version
vim /etc/php.ini
zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so

Re-Start Apache Service
service apache2 restart
(or)
service httpd restart

Check Ioncube Loader in Web Interface
http://IP-Address/loader-wizard.php
Click on Local Install
1

Loader Installed (PHP Will Work)2