summaryrefslogtreecommitdiffstats
path: root/raddb/mods-config/sql/main/mysql/setup.sql
blob: 5ae98cc204a9b19573e75ba83183f0a2dc93757e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- text -*-
##
## setup.sql -- MySQL commands for creating the RADIUS user.
##
##	WARNING: You should change 'localhost' and 'radpass'
##		 to something else.  Also update raddb/mods-available/sql
##		 with the new RADIUS password.
##
##	$Id$

#
#  Create default administrator for RADIUS
#
CREATE USER 'radius'@'localhost' IDENTIFIED BY 'radpass';

#
#  The server can read the authorisation data
#
GRANT SELECT ON radius.radcheck TO 'radius'@'localhost';
GRANT SELECT ON radius.radreply TO 'radius'@'localhost';
GRANT SELECT ON radius.radusergroup TO 'radius'@'localhost';
GRANT SELECT ON radius.radgroupcheck TO 'radius'@'localhost';
GRANT SELECT ON radius.radgroupreply TO 'radius'@'localhost';

#
#  The server can write accounting and post-auth data
#
GRANT SELECT, INSERT, UPDATE ON radius.radacct TO 'radius'@'localhost';
GRANT SELECT, INSERT, UPDATE ON radius.radpostauth TO 'radius'@'localhost';

#
#  The server can read the NAS data
#
GRANT SELECT ON radius.nas TO 'radius'@'localhost';

#
#  In the case of the "lightweight accounting-on/off" strategy, the server also
#  records NAS reload times
#
GRANT SELECT, INSERT, UPDATE ON radius.nasreload TO 'radius'@'localhost';