aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/install/base/mysql/private-users.sql
blob: 101188f543d34023bdf4dc9189b80d72ca8c4c36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
USE %MYSQL_PRIVATE_DB%;

INSERT INTO accounts 
    (policy, userAccount, userCn, userPassword, shadowLastChange, shadowMin, shadowMax, shadowWarning, shadowInactive, shadowExpire)
    VALUES ('private','mayoradmin','MaYoR Adminisztrátor',SHA('jelszo'),(TO_DAYS(now())-TO_DAYS("1970-01-01"))-80,2,80,10,0,NULL);
SET @uid = (SELECT uid FROM accounts WHERE userAccount='mayoradmin');
INSERT INTO groups (groupCn,groupDesc,policy) VALUES ('useradmin','Adminisztrátor','private'),('tanar','Tanárok','private'),
	    ('diak','Diákok','private'),('titkarsag','Titkárság','private'),('egyeb','Egyéb','private');
SET @gid = (SELECT gid FROM groups WHERE groupCn='useradmin');
INSERT INTO members (uid,gid) VALUES (@uid,@gid);
SET @gid = (SELECT gid FROM groups WHERE groupCn='egyeb');
INSERT INTO members (uid,gid) VALUES (@uid,@gid);