1 # This file created by Devrim SERAL<devrim@gazi.edu.tr>
2 # For creating tac_plus related database and tables
4 CREATE DATABASE tacacs;
8 # name | surname | usern | tel | address
11 # usern : Account name
15 CREATE TABLE id ( name char(40) NOT NULL, surname char(40) NOT NULL,usern char(15) NOT NULL,tel char(20), address char(50) ,PRIMARY KEY(usern));
17 # auth tables fields are:
18 # usern | passwd | exp_time | time_limit | lck
19 # usern : Account name
20 # passwd : usern password
21 # exp_time : Expire date
22 # time_limit : Time limiting
23 # lck : Adminstrative lock
25 CREATE TABLE auth( usern CHAR(15) NOT NULL, passwd CHAR(15) NOT NULL, exp_time TIMESTAMP(8) NOT NULL ,time_limit CHAR(30) DEFAULT "*",lck ENUM("T","F") DEFAULT "F",PRIMARY KEY(usern) );
27 # acct tables fields are:
28 # usern | s_name | c_name | elapsed_time | bytes_in | bytes_out | fin_t
29 # usern : Account name
30 # s_name : Server name(RAS)
31 # c_name : Client Name
32 # elapsed_time : How much the user spent on router
33 # bytes_in : Incoming bytes to port
34 # bytes_out : Outgoing bytes from port
35 # fin_t : When the accounting is finished
37 CREATE TABLE acct( usern CHAR(15) NOT NULL, s_name CHAR(30) NOT NULL, c_name CHAR(30) NOT NULL, elapsed_time INT NOT NULL, bytes_in INT DEFAULT 0, bytes_out INT DEFAULT 0,fin_t TIMESTAMP(14) NOT NULL,INDEX acct_index(usern(10)));