Chetan Gaonker | 7f4bf74 | 2016-05-04 15:56:08 -0700 | [diff] [blame] | 1 | /* |
| 2 | * admin.sql -- PostgreSQL commands for creating the RADIUS user. |
| 3 | * |
| 4 | * WARNING: You should change 'localhost' and 'radpass' |
| 5 | * to something else. Also update raddb/sql.conf |
| 6 | * with the new RADIUS password. |
| 7 | * |
| 8 | * WARNING: This example file is untested. Use at your own risk. |
| 9 | * Please send any bug fixes to the mailing list. |
| 10 | * |
| 11 | * $Id: 26d08cae41c788321bdf8fd1b0c41a443b2da6f4 $ |
| 12 | */ |
| 13 | |
| 14 | /* |
| 15 | * Create default administrator for RADIUS |
| 16 | */ |
| 17 | CREATE USER radius WITH PASSWORD 'radpass'; |
| 18 | |
| 19 | /* |
| 20 | * The server can read any table in SQL |
| 21 | */ |
| 22 | GRANT SELECT ON radcheck TO radius; |
| 23 | GRANT SELECT ON radreply TO radius; |
| 24 | GRANT SELECT ON radgroupcheck TO radius; |
| 25 | GRANT SELECT ON radgroupreply TO radius; |
| 26 | GRANT SELECT ON radusergroup TO radius; |
| 27 | |
| 28 | /* |
| 29 | * The server can write to the accounting and post-auth logging table. |
| 30 | */ |
| 31 | GRANT SELECT, INSERT, UPDATE on radacct TO radius; |
| 32 | GRANT SELECT, INSERT, UPDATE on radpostauth TO radius; |