-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgroups_utils.sh
More file actions
44 lines (37 loc) · 966 Bytes
/
groups_utils.sh
File metadata and controls
44 lines (37 loc) · 966 Bytes
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
#!/usr/bin/env bash
# groups.list() {
# getent group
# }
# group.create() {
# groupadd
# }
# group.user.add() {
# local groups
# local username
# usermod --append --groups "${groups}" "${username}"
# }
# group.user.rem() {
# local groups
# local username
# usermod --remove --groups "${groups}" "${username}"
# }
# group.user.list() {
# lid --group --onlynames "${groupname}"
# }
# New default groups
# adduser --conf --add_extra_groups
# /etc/adduser.conf
# EXTRA_GROUPS=
# /etc/default/useradd
# /etc/shadow-maint/useradd-pre.d/
# /etc/shadow-maint/useradd-post.d/
# vvv Not going to work vvv
# Suggested new default groups
# shared - for shared system files
# mkdir -p /var/local/bin
# sudo chown --recursive :shared /var/local/bin
# sudo semanage fcontext --add --type bin_t "/var/local/bin(/.*)?"
# sudo chmod --recursive g+rwxs /var/local/bin
# sudo restorecon -Rv /var/local/bin
# export PATH="/var/local/bin:$PATH"
# ^^^ Not going to work ^^^