-
Notifications
You must be signed in to change notification settings - Fork 18
/
radius.sql
267 lines (219 loc) · 8.7 KB
/
radius.sql
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
-- phpMyAdmin SQL Dump
-- version 4.8.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 172.100.0.101
-- Generation Time: May 22, 2018 at 12:23 PM
-- Server version: 5.7.22
-- PHP Version: 7.2.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `radius`
--
CREATE DATABASE IF NOT EXISTS `radius` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
USE `radius`;
-- --------------------------------------------------------
--
-- Table structure for table `admins`
--
CREATE TABLE IF NOT EXISTS `admins` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) NOT NULL,
`firstname` varchar(30) NOT NULL,
`lastname` varchar(30) NOT NULL,
`password` varchar(50) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `admins`
--
INSERT INTO `admins` (`id`, `username`, `firstname`, `lastname`, `password`) VALUES
(1, 'admin', 'Default', 'Admin', '5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8');
-- --------------------------------------------------------
--
-- Table structure for table `groups`
--
CREATE TABLE IF NOT EXISTS `groups` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) NOT NULL,
`description` varchar(80) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `groups`
--
INSERT INTO `groups` (`id`, `name`, `description`) VALUES
(1, 'staff', NULL),
(3, 'engineers', NULL),
(5, 'default', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `nas`
--
CREATE TABLE IF NOT EXISTS `nas` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`nasname` varchar(128) CHARACTER SET latin1 NOT NULL,
`shortname` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
`type` varchar(30) CHARACTER SET latin1 DEFAULT 'other',
`ports` int(5) DEFAULT NULL,
`secret` varchar(60) CHARACTER SET latin1 NOT NULL DEFAULT 'secret',
`server` varchar(64) CHARACTER SET latin1 DEFAULT NULL,
`community` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
`description` varchar(200) CHARACTER SET latin1 DEFAULT 'RADIUS Client',
PRIMARY KEY (`id`),
KEY `nasname` (`nasname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `radacct`
--
CREATE TABLE IF NOT EXISTS `radacct` (
`radacctid` bigint(21) NOT NULL AUTO_INCREMENT,
`acctsessionid` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`acctuniqueid` varchar(32) CHARACTER SET latin1 NOT NULL DEFAULT '',
`username` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`groupname` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`realm` varchar(64) CHARACTER SET latin1 DEFAULT '',
`nasipaddress` varchar(15) CHARACTER SET latin1 NOT NULL DEFAULT '',
`nasportid` varchar(15) CHARACTER SET latin1 DEFAULT NULL,
`nasporttype` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
`acctstarttime` datetime DEFAULT NULL,
`acctupdatetime` datetime DEFAULT NULL,
`acctstoptime` datetime DEFAULT NULL,
`acctinterval` int(12) DEFAULT NULL,
`acctsessiontime` int(12) UNSIGNED DEFAULT NULL,
`acctauthentic` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
`connectinfo_start` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
`connectinfo_stop` varchar(50) CHARACTER SET latin1 DEFAULT NULL,
`acctinputoctets` bigint(20) DEFAULT NULL,
`acctoutputoctets` bigint(20) DEFAULT NULL,
`calledstationid` varchar(50) CHARACTER SET latin1 NOT NULL DEFAULT '',
`callingstationid` varchar(50) CHARACTER SET latin1 NOT NULL DEFAULT '',
`acctterminatecause` varchar(32) CHARACTER SET latin1 NOT NULL DEFAULT '',
`servicetype` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
`framedprotocol` varchar(32) CHARACTER SET latin1 DEFAULT NULL,
`framedipaddress` varchar(15) CHARACTER SET latin1 NOT NULL DEFAULT '',
PRIMARY KEY (`radacctid`),
UNIQUE KEY `acctuniqueid` (`acctuniqueid`),
KEY `username` (`username`),
KEY `framedipaddress` (`framedipaddress`),
KEY `acctsessionid` (`acctsessionid`),
KEY `acctsessiontime` (`acctsessiontime`),
KEY `acctstarttime` (`acctstarttime`),
KEY `acctinterval` (`acctinterval`),
KEY `acctstoptime` (`acctstoptime`),
KEY `nasipaddress` (`nasipaddress`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `radcheck`
--
CREATE TABLE IF NOT EXISTS `radcheck` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`username` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`attribute` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`op` char(2) CHARACTER SET latin1 NOT NULL DEFAULT '==',
`value` varchar(253) CHARACTER SET latin1 NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `username` (`username`(32))
) ENGINE=InnoDB AUTO_INCREMENT=480 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `radcheck`
--
INSERT INTO `radcheck` (`id`, `username`, `attribute`, `op`, `value`) VALUES
(478, 'testuser', 'SHA-Password', ':=', '0f47d148a94d7c492327aee00986b24503b0667b'),
(479, 'testuser', 'Simultaneous-Use', ':=', '5');
-- --------------------------------------------------------
--
-- Table structure for table `radgroupcheck`
--
CREATE TABLE IF NOT EXISTS `radgroupcheck` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`groupname` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`attribute` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`op` char(2) CHARACTER SET latin1 NOT NULL DEFAULT '==',
`value` varchar(253) CHARACTER SET latin1 NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `groupname` (`groupname`(32))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `radgroupreply`
--
CREATE TABLE IF NOT EXISTS `radgroupreply` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`groupname` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`attribute` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`op` char(2) CHARACTER SET latin1 NOT NULL DEFAULT '=',
`value` varchar(253) CHARACTER SET latin1 NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `groupname` (`groupname`(32))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `radpostauth`
--
CREATE TABLE IF NOT EXISTS `radpostauth` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`pass` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`reply` varchar(32) CHARACTER SET latin1 NOT NULL DEFAULT '',
`authdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `radreply`
--
CREATE TABLE IF NOT EXISTS `radreply` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`username` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`attribute` varchar(64) CHARACTER SET latin1 NOT NULL DEFAULT '',
`op` char(2) CHARACTER SET latin1 NOT NULL DEFAULT '=',
`value` varchar(253) CHARACTER SET latin1 NOT NULL DEFAULT '',
PRIMARY KEY (`id`),
KEY `username` (`username`(32))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `radusergroup`
--
CREATE TABLE IF NOT EXISTS `radusergroup` (
`username` varchar(64) NOT NULL DEFAULT '',
`groupname` varchar(64) NOT NULL DEFAULT '',
`priority` int(11) NOT NULL DEFAULT '1',
KEY `username` (`username`(32))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `radusergroup`
--
INSERT INTO `radusergroup` (`username`, `groupname`, `priority`) VALUES
('testuser', 'default', 1);
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(40) NOT NULL,
`firstname` varchar(50) NOT NULL,
`lastname` varchar(50) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `username`, `firstname`, `lastname`) VALUES
(8, 'testuser', 'Test', 'User');
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;