Skip to content

Latest commit

 

History

History

samba

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

xsrv.samba

This role will install Samba, a file sharing service compatible with many operating systems. Samba is a free software re-implementation of Microsoft SMB/CIFS communication protocol.

The server is set up as a "standalone"/workgroup server (ie. not part of a domain) and can use one of these backends for user accounts:

  • standard local Linux users
  • LDAP users

Requirements/dependencies/example playbook

  • See meta/main.yml
  • The LDAP server must be running on the same host as the samba server if samba_passdb_backend: ldpsam is used, and be deployed before the samba role.
# playbook.yml
- hosts: my.CHANGEME.org
  roles:
    - nodiscc.xsrv.common # (optional) base server setup, hardening, firewall
    - nodiscc.xsrv.monitoring # (optional) system/server monitoring and health checks
    - nodiscc.xsrv.backup # (optional) automatic backups
    - nodiscc.xsrv.openldap # (required if samba_passdb_backend: ldapsam) LDAP user backend
    - nodiscc.xsrv.samba

See defaults/main.yml for all configuration variables

Usage

Accessing samba shares

  • From Windows clients: access from the Network entry in the Windows file manager sidebar, or directly at \\SERVER_ADDRESS in the explorer location bar.
  • From Mac OSX clients: access from the Network entry in the OSX Finder sidebar, or directly at smb://SERVER_ADDRESS/ from the Go > Connect to server... finder menu entry.
  • From Linux clients: access from the Network > Windows Network entry in the file manager sidebar, or directly at smb://SERVER_ADDRESS/ from the File > Connect to server... menu entry.

Backups

See the included rsnapshot configuration for the backup role.

Removing samba users

This role does not remove any user accounts. To remove a samba user account, remove it from the samba_users list, and remove their account from the server manually with sudo deluser my_old_user

Tags

samba - setup samba file server
samba-shares - configfure samba file shares
samba-users - configfure samba user accounts
utils-samba-listusers - (manual) list samba users

License

GNU GPLv3

References