Skip to content

Instantly share code, notes, and snippets.

@zentralwerkstatt
Created May 15, 2019 17:51
Show Gist options
  • Select an option

  • Save zentralwerkstatt/b6bc84e3b99bd814617f2957b7d2f44c to your computer and use it in GitHub Desktop.

Select an option

Save zentralwerkstatt/b6bc84e3b99bd814617f2957b7d2f44c to your computer and use it in GitHub Desktop.

Revisions

  1. Fabian Offert created this gist May 15, 2019.
    13 changes: 13 additions & 0 deletions instructions.md
    Original 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`