homeserver/roles/mgrote_fileserver_smb
Michael Grote bc6f8fdc9e
All checks were successful
ansible-lint / gitleaks (push) Successful in 5s
ansible-lint / Ansible Lint (push) Successful in 1m0s
add no_log as global variable (#233)
Reviewed-on: #233
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2024-11-10 15:56:59 +01:00
..
defaults
handlers add no_log as global variable (#233) 2024-11-10 15:56:59 +01:00
tasks add no_log as global variable (#233) 2024-11-10 15:56:59 +01:00
templates
README.md keepass housekeeping, adding subdirs, updating vault pass (#232) 2024-11-10 15:44:41 +01:00

mgrote.fileserver_smb

Beschreibung

Installiert und konfiguriert einen Fileserver mit Samba.

Rechte

Rechte im Dateisystem sind

  • chown -R root:users /shares/
  • chmod -R 777 /shares/
  • alle Nutzer sind Mitglied der Gruppe "users"
  • in Samba(global)
    • force user = root
    • force group = users Damit werden die Nutzer mit Ihrem Konto auf die SAMBA-Freigabe berechtigt, aber die Lese/Schreiboperationen auf dem Dateisystem als "root" durchgefuehrt.

getestet auf

  • Ubuntu (>=20.04)

Samba Version

Possible values are :
SMB2_02: The earliest SMB2 version.
SMB2_10: Windows 7 SMB2 version.
SMB2_22: Early Windows 8 SMB2 version.
SMB2_24: Windows 8 beta SMB2 version.
SMB3: The same as SMB2. Used by Windows 8. SMB3 has sub protocols available.
SMB3_00: Windows 8 SMB3 version. (mostly the same as SMB2_24)
SMB3_02: Windows 8.1 SMB3 version.
SMB3_10: early Windows 10 technical preview SMB3 version.
SMB3_11: Windows 10 technical preview SMB3 version (maybe final).

Variablen

Nutzer

  smb_users:
    - name: 'xxx' # Nutzername
      password: "{{ lookup('viczem.keepass.keepass', 'fileserver/fileserver_smb_user_xxx', 'password') }}" # Passwort als Klartext
      state: present # Status(default: present)
      remove_dir: false # removes homedir if state is absent und remove_dir is true (default: false)
      ```

#### Freigaben

smb_shares: - name: 'videos' # Freigabename path: '/shares_videos' # Pfad auf SMB-Server users_ro: ' win10 kodi' # Nutzer - Lesezugriff users_rw: 'xxx michaelgrote' # Nutzer - Schreibzugriff # Optional(+default-values) item.guest ok: "no" item.read only: "no" browseable: "yes" inherit acls: "yes" inherit permissions: "no" ea support: "no" store dos attributes: "no" printable: "no" create mask: "0664" force create mode: "0664" directory mask: "0775" force directory_mode: "0775" hide special files: "yes" follow symlinks: "yes" hide dot files: "no"


### weitere Variablen + Defaults
siehe [defaults](./defaults/main.yml)