14 lines
387 B
Bash
Executable File
14 lines
387 B
Bash
Executable File
#!/bin/bash
|
|
# create a new group "fingers"
|
|
sudo addgroup fingers
|
|
for u in $(ls ~/..) ; do
|
|
# add user to "fingers" group
|
|
sudo adduser "$u" fingers
|
|
uhome="$(getent passwd "$u" | cut -d: -f6)"
|
|
# allow group read and search for user's $HOME directory
|
|
sudo chmod g+rx "$uhome"
|
|
# allow group read of .plan, .project
|
|
sudo chmod g+r "$uhome"/{.plan,.project}
|
|
done
|
|
|