n RAdmin Frequently Asked Questions
update RADADMINUSERS set PROFILENAME='Everything' where USERNAME='anonymous'
if ($Radmin::CGIUtil::db eq 'cust1') { $Radmin::config{DBSource} = 'dbi:mysql:radmin1:localhost'; $Radmin::config{DBUsername} = 'radmin1'; $Radmin::config{DBAuth} = 'radmin1pw'; } elsif ($Radmin::CGIUtil::db eq 'cust2') { $Radmin::config{DBSource} = 'dbi:mysql:radmin2:localhost'; $Radmin::config{DBUsername} = 'radmin2'; $Radmin::config{DBAuth} = 'radmin2pw'; } else { &fatalError("No Radmin database selected"); }
In the web server log, you see: A serious error has occurred: Could not connect to SQL database dbi:mysql:radmin:localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) And if you try to connect to the mysql server when you are other than root or mysql, you get a similar error: mysql -uradmin -pradminpw radmin ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
A serious error has occurred: Could not connect to SQL database dbi:mysql:radmin:localhost: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
mysql -uradmin -pradminpw radmin ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
This problem can be caused by incorrect permissions on the mysql directory, preventing access to the socket unless the current user is mysql or root. You can fix it by using this command while logged in as mysql or root: chmod a+x /var/lib/mysql 5. How can I use custom Vendor-Specific attributes in my dictionaryRAdmin comes with all the standard Radius attribtues from the Radiator dictionary, which will normally that Radiator and RAdmin will work together properly. If you have custom or non-standrard Vendor-Specific attribtues in your Radiator dictionary, you can get them into Radmin with this procedure. This procedure converts your Radiator dictionary into a form usable by RAdmin, and replaces the entire contents of the RADATTRS and RADVALUES tables. perl goodies/convertDict.pl /path/to/your/dictionary >myradattrs.dat perl createdb.pl -create RADATTRS:RADVALUES -dropfirst myradattrs.dat 6. How can I add custom fields to my Radmin database Caution: this procedure requires a detailed undesrstanding of Radmin files, Perl and SQL databases. To add a custom editable field to a Radmin database table, you need to do 3 things: Alter your SQL server database table to add the new column. You will generally need to choose either an integer (INT) or text (VARCHAR) column. You will generally use the interactive SQL interpreter for your SQL database server to enter the SQL command to add a new column. The usual syntax for adding another column to a live database table is: ALTER TABLE tablename ADD columnname columntype; for example: ALTER TABLE RADUSERS ADD NOTES VARCHAR(255); Add information about the new column into the Radmin Schema.pm file. SChema.pm contains database-independent descriptions of all the tables Radmin uses, with a section for each table. In the 'columns' section of your table, add a new line that describes the type of the new column, eg: # local customisation: 'NOTES' => [ 'varchar', 255], Add a user interface definition to the script file that handles the table. For example if you wanted to make the NOTES column you created above to the 'Edit USer' page, you would edit the editUser.pl file and add something like this to the fields section of the uiDesc structure: [ 'NOTES', 'Notes', '', 'text', '', 30], Which will result in a 30 character wide editable text field conneted to the NOTES column on the RADUSERS table. 7. I run 'createdb.pl -create basicdb.dat radattrs.dat' but my tables are not created properly There was an error in the 1.7 documentation for building the Ramdin dataabse on PCs. It said to run: perl createdb.pl -create basicdb.dat radattrs.dat This is incorrect. It should be: perl createdb.pl -create -- basicdb.dat radattrs.dat 8. I get errors when I try to install on PostgreSQL 7.3 or laterIf you see errors like: IDENT authentication failed for user "radmin" this is due to the new PostgreSQL authentication system. You will need to add a line to your PostgreSQL authentication permissions file (typically /var/lib/pgsql/data/pg_hba.conf) like this: # add the following line before the 'local all all' line local radmin radmin md5 local all all ident sameuser 9. How do enable the use of Vasco Digipass with Radmin? Ensure you have installed Radiator 3.10 or later and RAdmin 1.9 or later. Install the Authen-Digipass module. Precompiled binaries for Sparc Solaris, Linux x86 and Windows are included with Radiator. Consult the instrucitons in goodies/digipass-install.txt in your Radiator distribution. Using the Edit Radmin Config page, enable the 'Support Vasco Digipass?' option. Click Update. Configure Radiator using the example configuration file in goodies/radminDigipass.cfg. 10. How do I install Radmin on Windows with ApacheUse the latest stable version of Apache2 (2.0.54 at this time). For a default Apache 2 installation, when running the Radmin install.pl you will need to enter these paths: Web server html directory: c:\Program Files\Apache Group\Apache2\htdocs Web server CGI directory: c:\Program Files\Apache Group\Apache2\cgi-bin With Radmin 1.9 and earlier, you will also have to make a modifications to the Apache configuration (Start->All Programs->Apache HTTP Server->Configure Apache Server->edit Apache httpd.conf file). Add the folowing line to the end of the Apache configuration file httpd.conf: ScriptInterpreterSource registry And restart Apache. This is configuration change is not required if you have Radmin 1.9 plus patches or later.
chmod a+x /var/lib/mysql
If you have custom or non-standrard Vendor-Specific attribtues in your Radiator dictionary, you can get them into Radmin with this procedure. This procedure converts your Radiator dictionary into a form usable by RAdmin, and replaces the entire contents of the RADATTRS and RADVALUES tables. perl goodies/convertDict.pl /path/to/your/dictionary >myradattrs.dat perl createdb.pl -create RADATTRS:RADVALUES -dropfirst myradattrs.dat 6. How can I add custom fields to my Radmin database Caution: this procedure requires a detailed undesrstanding of Radmin files, Perl and SQL databases. To add a custom editable field to a Radmin database table, you need to do 3 things: Alter your SQL server database table to add the new column. You will generally need to choose either an integer (INT) or text (VARCHAR) column. You will generally use the interactive SQL interpreter for your SQL database server to enter the SQL command to add a new column. The usual syntax for adding another column to a live database table is: ALTER TABLE tablename ADD columnname columntype; for example: ALTER TABLE RADUSERS ADD NOTES VARCHAR(255); Add information about the new column into the Radmin Schema.pm file. SChema.pm contains database-independent descriptions of all the tables Radmin uses, with a section for each table. In the 'columns' section of your table, add a new line that describes the type of the new column, eg: # local customisation: 'NOTES' => [ 'varchar', 255], Add a user interface definition to the script file that handles the table. For example if you wanted to make the NOTES column you created above to the 'Edit USer' page, you would edit the editUser.pl file and add something like this to the fields section of the uiDesc structure: [ 'NOTES', 'Notes', '', 'text', '', 30], Which will result in a 30 character wide editable text field conneted to the NOTES column on the RADUSERS table. 7. I run 'createdb.pl -create basicdb.dat radattrs.dat' but my tables are not created properly There was an error in the 1.7 documentation for building the Ramdin dataabse on PCs. It said to run: perl createdb.pl -create basicdb.dat radattrs.dat This is incorrect. It should be: perl createdb.pl -create -- basicdb.dat radattrs.dat 8. I get errors when I try to install on PostgreSQL 7.3 or laterIf you see errors like: IDENT authentication failed for user "radmin" this is due to the new PostgreSQL authentication system. You will need to add a line to your PostgreSQL authentication permissions file (typically /var/lib/pgsql/data/pg_hba.conf) like this: # add the following line before the 'local all all' line local radmin radmin md5 local all all ident sameuser 9. How do enable the use of Vasco Digipass with Radmin? Ensure you have installed Radiator 3.10 or later and RAdmin 1.9 or later. Install the Authen-Digipass module. Precompiled binaries for Sparc Solaris, Linux x86 and Windows are included with Radiator. Consult the instrucitons in goodies/digipass-install.txt in your Radiator distribution. Using the Edit Radmin Config page, enable the 'Support Vasco Digipass?' option. Click Update. Configure Radiator using the example configuration file in goodies/radminDigipass.cfg. 10. How do I install Radmin on Windows with ApacheUse the latest stable version of Apache2 (2.0.54 at this time). For a default Apache 2 installation, when running the Radmin install.pl you will need to enter these paths: Web server html directory: c:\Program Files\Apache Group\Apache2\htdocs Web server CGI directory: c:\Program Files\Apache Group\Apache2\cgi-bin With Radmin 1.9 and earlier, you will also have to make a modifications to the Apache configuration (Start->All Programs->Apache HTTP Server->Configure Apache Server->edit Apache httpd.conf file). Add the folowing line to the end of the Apache configuration file httpd.conf: ScriptInterpreterSource registry And restart Apache. This is configuration change is not required if you have Radmin 1.9 plus patches or later.
perl goodies/convertDict.pl /path/to/your/dictionary >myradattrs.dat perl createdb.pl -create RADATTRS:RADVALUES -dropfirst myradattrs.dat
To add a custom editable field to a Radmin database table, you need to do 3 things:
ALTER TABLE tablename ADD columnname columntype; for example: ALTER TABLE RADUSERS ADD NOTES VARCHAR(255);
# local customisation: 'NOTES' => [ 'varchar', 255],
[ 'NOTES', 'Notes', '', 'text', '', 30],
perl createdb.pl -create basicdb.dat radattrs.dat
perl createdb.pl -create -- basicdb.dat radattrs.dat
IDENT authentication failed for user "radmin"
# add the following line before the 'local all all' line local radmin radmin md5 local all all ident sameuser
Web server html directory: c:\Program Files\Apache Group\Apache2\htdocs Web server CGI directory: c:\Program Files\Apache Group\Apache2\cgi-bin
ScriptInterpreterSource registry