forked from ome/omego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcreate_users
45 lines (40 loc) · 2.19 KB
/
create_users
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
# Create groups
group add private-1 --perms 'rw----'
group add read-only-1 --perms 'rwr---'
group add read-annotate-1 --perms 'rwra--'
group add read-write-1 --perms 'rwrw--'
# Create users
user add user-1 user-1 user-1 private-1 -P ome
user add user-2 user-2 user-2 private-1 read-only-1 -P ome
user add user-3 user-3 user-3 read-only-1 read-annotate-1 -P ome
user add user-4 user-4 user-4 read-only-1 read-write-1 -P ome
user add user-5 user-5 user-5 read-annotate-1 read-write-1 -P ome
user add -a user-6 user-6 user-6 private-1 read-only-1 read-annotate-1 read-write-1 -P ome
user add user-7 user-7 user-7 private-1 -P ome
user add user-8 user-8 user-8 private-1 read-only-1 -P ome
user add user-9 user-9 user-9 read-only-1 read-annotate-1 -P ome
user add user-10 user-10 user-10 read-only-1 read-write-1 -P ome
user add user-11 user-11 user-11 read-annotate-1 read-write-1 -P ome
user add -a user-12 user-12 user-12 private-1 read-only-1 read-annotate-1 read-write-1 -P ome
# Set group owners
group adduser --name private-1 user-1 user-7 --as-owner
group adduser --name read-only-1 user-3 user-9 --as-owner
group adduser --name read-annotate-1 user-5 user-11 --as-owner
group adduser --name read-write-1 user-4 user-10 --as-owner
# Create admin groups
group add adm-private-1 --perms 'rw----'
group add adm-read-only-1 --perms 'rwr---'
group add adm-read-annotate-1 --perms 'rwra--'
group add adm-read-write-1 --perms 'rwrw--'
# Create admin group users
user add adm-user-1 adm-user-1 adm-user-1 adm-private-1 -P ome
user add adm-user-2 adm-user-2 adm-user-2 adm-private-1 adm-read-only-1 -P ome
user add adm-user-3 adm-user-3 adm-user-3 adm-read-only-1 adm-read-annotate-1 -P ome
user add adm-user-4 adm-user-4 adm-user-4 adm-read-only-1 adm-read-write-1 -P ome
user add adm-user-5 adm-user-5 adm-user-5 adm-read-annotate-1 adm-read-write-1 -P ome
user add -a adm-user-6 adm-user-6 adm-user-6 adm-private-1 adm-read-only-1 adm-read-annotate-1 adm-read-write-1 -P ome
# Set admin group owners
group adduser --name adm-private-1 adm-user-1 --as-owner
group adduser --name adm-read-only-1 adm-user-3 --as-owner
group adduser --name adm-read-annotate-1 adm-user-5 --as-owner
group adduser --name adm-read-write-1 adm-user-4 --as-owner