Created
May 15, 2019 17:51
-
-
Save zentralwerkstatt/b6bc84e3b99bd814617f2957b7d2f44c to your computer and use it in GitHub Desktop.
Revisions
-
Fabian Offert created this gist
May 15, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ - Add user with home directory: `sudo useradd -m username` - As user, change default shell: `chsh -s /bin/bash` - Set temp. password: `sudo passwd username` - Create group: `sudo groupadd groupname` - Add users: `usermod -a -G groupname username` - Make shared directory: `sudo mkdir /home/groupname` - Set group for shared directory: `sudo chgrp groupname /home/groupname` - Add write access for group: `sudo chmod g+w /home/groupname` - "Set GID" for group (all files created owned by group): `sudo chmod 2775 /home/groupname` - Change to different user to test: `su - username` - Try write access: `touch /home/groupname/test.txt` - Change to different user to test: `su - username` - Try write access: `touch /home/groupname/test.txt`