n

RAdmin Frequently Asked Questions

  • 1. I accidentally made my only user have a profile of 'Nothing' and now I can't do anything
  • 2. How do I make my perl CGI scripts run properly on IIS on NT?
  • 3. How do I run multiple independent Radmin databases?
  • 4. On RedHat Linux, I get a connection error
  • 5. How can I use custom Vendor-Specific attributes in my dictionary
  • 6. How can I add custom fields to my Radmin database
  • 7. I run 'createdb.pl -create basicdb.dat radattrs.dat' but my tables are not created properly
  • 8. I get errors when I try to install on PostgreSQL 7.3 or later
  • 9. How do enable the use of Vasco Digipass with Radmin?
  • 10. How do I install Radmin on Windows with Apache

    1. I accidentally made my only user have a profile of 'Nothing' and now I can't do anything

    The permissions are held in your SQL database. So the best way is to use the interactive SQL application for your particular database (mysql for MySQL, sqlplus for Oracle, isql for Sybase and MS-SQL etc) and issue this command:
    update RADADMINUSERS set PROFILENAME='Everything' where USERNAME='anonymous'
    

    2. How do I make my perl CGI scripts run properly on IIS on NT?

    See this
    for some assistance.

    3. How do I run multiple independent Radmin databases?

    All the Radmin scripts accept a "database" tag. If you access one of the scripts with, say http://www.your.com/cgi-bin/Radmin/private/editUser.pl?database=cust1 then the variable $Radmin::CGIUtil::db will automatically be set to 'cust1', and every other link on the page will also have the database=cust tag set automatically. You can therefore use the $Radmin::CGIUtil::db to select a databse to connect to when each script runs, and the user will continue using the same database as they follow the links within the Radmin pages. You could therefore use something like this in your Sql.pm:
    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");
    }
    

    4. On RedHat Linux, I get a connection error

    This problem occurs with 3.23.22-beta-log, at least. The symptoms of this problem are:

    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)
    

    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 dictionary

    RAdmin 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:

    1. 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);
      
    2. 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],
      
    3. 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 later

    If 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?

    1. Ensure you have installed Radiator 3.10 or later and RAdmin 1.9 or later.
    2. 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.
    3. Using the Edit Radmin Config page, enable the 'Support Vasco Digipass?' option. Click Update.
    4. Configure Radiator using the example configuration file in goodies/radminDigipass.cfg.

    10. How do I install Radmin on Windows with Apache

    Use 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.
  •