Update the README file with notes about the scripts present in the bin folder
[freeradius.git] / dialup_admin / README
1 dialup_admin is a web based administration interface for the freeradius radius server.
2 It is written in PHP4 (although the files have an extension of php3 for historical reasons).
3 It is modular and right now it assumes that user information is stored in an ldap server
4 or an sql database and accounting in an sql server.
5
6 INSTALLATION:
7
8 Put dialup_admin in /usr/local/dialupadmin
9 Create a link from your htdocs directory to /usr/local/dialupadmin/htdocs
10 Edit /usr/local/dialupadmin/conf/* files to match your needs
11
12
13 There are also a few more things included:
14
15 * sql/badusers.sql: It will create a table named badusers which can be used to hold the
16   history for badusers (date,action)
17 * sql/userinfo.sql: It will create a table named userinfo which contains personal information
18   for users stored in the sql database. This can be used if a sql database is used to store user profiles
19   (not ldap).
20 * bin/log_badlogins: It will constantly check the radiusd.log file and add all login-incorrect,
21   invalid-user, outside of allowed login time  and multiple-login cases to the radacct table with
22   acctstarttime=acctstoptime, acctsessiontime=0 and acctterminatecause containing the reason.
23   If the failing module sent back a module message then it will also appear in the terminate cause.
24   You will need to setup the $mysql and $tmpfile variables to suite your mysql installation and needs.
25   Perl module Date::Manip is needed by the script.
26 * bin/clean_radacct: It will delete all entries in the radacct table with a starttime > 1 day and
27   stoptime = 0. It will not do an harm even if it deletes valid entries since radiusd will fall
28   back to insert if update fails.
29 * bin/truncate_radacct: It will delete sessions from the radacct table which are older than a configurable
30   number of days
31 * bin/tot_stats: Update the totacct table with aggregated daily accounting information for each user.
32   We keep a row per user for each day.
33 * bin/monthly_tot_stats: Log in the mtotacct table aggregated accounting information for each user spaning
34   in one month period. If the current month has not ended it will log information up to the current month day
35
36
37
38
39 The structure of the tree is:
40
41 conf:: Contains various configuration files.
42 conf::admin.conf=>
43         The main configuration file. The directives used should be easily
44         understood
45 conf::config.php3=>
46         Just a helper php4 for reading the admin.conf file.
47 conf::default.vals=>
48         Contains the default values for check and reply items. If you also use the users
49         file except for the ldap/sql databases fill in the default values you have inserted
50         for the users.Else comment them out.
51 conf::sql.attrs=>
52         Contains inmformation about the sql attributes. This is used by the accounting
53         report generator (accounting.php3).
54 conf::user_edit.attrs=>
55         Contains the attributes that user_edit.php3 will show. Just uncomment those
56         which you want to be displayed.
57 conf::extra.ldap-attrmap=>
58         Contains a few items not included in ldap.attrmap which are used only by dialup_admin
59         Things like User-Password and Dialup-Lock-Msg. Use none for attributes that are not known
60         by the radius or ldap server.
61 conf::sql.attrmap=>
62         Contains the Attribute map for the sql database. Use none for attributes that are not known by
63         the radius server.
64 conf::auth.request=>
65         Contains value pairs sent in the test packets which are sent from the test user/server pages.
66
67 htdocs:: Contains the basic php files
68 htdocs::index.html=>
69         The main index file. Just contains the frames tags
70 htdocs::content.html=>
71         Change this file to include the greeting of your choise
72 htdocs::buttons.php3=>
73         This will open the corresponding buttons html file in the html/buttons folder
74 htdocs::style.css=>
75         CSS style file. Change it to match your preferences
76 htdocs:: user_state.php3 =>
77         It can be used by outside pages to get a quick
78         overview of the status of a user. It will return the following fields
79         separated by new lines:
80         account_status(active or inactive),lock message,weekly limit,daily limit,
81         weekly used,weekly connections,daily used,daily connections
82 htdocs:: user_finger.php3 =>
83         It will finger the nas(es) and show the logged in users. If an argument server is passed then
84         it will only show users for the specific access server.
85
86 html:: Contains the html code for a few pages 
87 html::user_admin.html.php3 =>
88         html code for the user_admin page
89 html::stats.html.php3 =>
90         html code for the stats page
91 html::user_toolbar.html.php3 =>
92         the user toolbar (show,edit,accounting...) which appears in almost all pages
93 html::group_toolbar.html.php3 =>
94         the toolbar shown in the group manipulation pages
95 html::/buttons
96         contains a folder default which contains a buttons.html.php3 file. When a user is connecting
97         with http authentication we first try to open the file in the folder <username>. If that fails
98         we open the file in the default folder. That way each admin can have a different view of the buttons
99         bar (for example see different finger pages).
100
101 lib::   Contains the library items
102 lib::ldap=>
103         The ldap files
104 lib::lang=>
105         Allow for multiple languages to be supported
106 lib::crypt=>
107         Allow for multiple encryption schemes (for user passwords)
108 lib::sql=>
109         Contains the sql library files. There is also a directory drivers
110         which contains functions for various sql databases (mysql and
111         postgresql for the time being).
112
113 The rest: The rest are the php4 files. Normally, you should not need to change anything in them.