--- admin.sql 2008-09-08 01:36:11.000000000 +0200 +++ /tmp/admin.sql 2009-07-08 15:35:12.000000000 +0200 @@ -1,28 +1,30 @@ -# -*- text -*- -## -## admin.sql -- PostgreSQL commands for creating the RADIUS user. -## -## WARNING: You should change 'localhost' and 'radpass' -## to something else. Also update raddb/sql.conf -## with the new RADIUS password. -## -## WARNING: This example file is untested. Use at your own risk. -## Please send any bug fixes to the mailing list. -## -## $Id: admin.sql,v 1.1 2008/04/30 08:53:06 aland Exp $ +/* + * $Id: admin.sql,v 1.1 2008/04/30 08:53:06 aland Exp $ + * + * admin.sql -- PostgreSQL commands for creating the RADIUS user. + * + * WARNING: You should change 'radpass' + * to something else. Also update raddb/sql.conf + * with the new RADIUS password. + * + * WARNING: This example file is untested. Use at your own risk. + * Please send any bug fixes to the mailing list. + */ -# -# Create default administrator for RADIUS -# -CREATE USER 'radius'@'localhost' WITH PASSWORD 'radpass'; +/* + * Create default administrator for RADIUS + */ -# The server can read any table in SQL -GRANT SELECT ON radcheck TO 'radius'@'localhost'; -GRANT SELECT ON radreply TO 'radius'@'localhost'; -GRANT SELECT ON radgroupcheck TO 'radius'@'localhost'; -GRANT SELECT ON radgroupreply TO 'radius'@'localhost'; -GRANT SELECT ON radusergroup TO 'radius'@'localhost'; +CREATE USER radius WITH PASSWORD 'radpass'; + +-- The server can read the configuration data +GRANT SELECT ON radcheck TO radius; +GRANT SELECT ON radreply TO radius; +GRANT SELECT ON radgroupcheck TO radius; +GRANT SELECT ON radgroupreply TO radius; +GRANT SELECT ON radusergroup TO radius; + +-- The server can write to the accounting and post-auth logging table. +GRANT INSERT,UPDATE on radacct TO radius; +GRANT INSERT,UPDATE on radpostauth TO radius; -# The server can write to the accounting and post-auth logging table. -GRANT ALL on radius.radacct TO 'radius'@'localhost'; -GRANT ALL on radius.radpostauth TO 'radius'@'localhost';