blob: 50bfe71958a95a35c875ff97865da2ba46158c5b [file] [log] [blame]
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
/*
* 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: 26d08cae41c788321bdf8fd1b0c41a443b2da6f4 $
*/
/*
* Create default administrator for RADIUS
*/
CREATE USER radius WITH PASSWORD 'radpass';
/*
* The server can read any table in SQL
*/
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 SELECT, INSERT, UPDATE on radacct TO radius;
GRANT SELECT, INSERT, UPDATE on radpostauth TO radius;