add new options guest_account, share.writable, share.guest_ok

This commit is contained in:
morbidick 2017-03-10 18:55:02 +01:00
parent 2bdb99f39a
commit 812082a8f2
2 changed files with 10 additions and 0 deletions

View File

@ -38,6 +38,7 @@ No specific requirements
| `samba_shares_root` | `/srv/shares` | Directories for the shares are created under this directory. | | `samba_shares_root` | `/srv/shares` | Directories for the shares are created under this directory. |
| `samba_users` | [] | List of dicts defining users that can access shares. | | `samba_users` | [] | List of dicts defining users that can access shares. |
| `samba_workgroup` | `WORKGROUP` | Name of the server workgroup. | | `samba_workgroup` | `WORKGROUP` | Name of the server workgroup. |
| `samba_guest_account` | - | Guest account for unknown users |
### Defining users ### Defining users
@ -112,6 +113,8 @@ A complete overview of share options follows below. Only `name` is required, the
| `setype` | `samba_share_t` | The SELinux type of the share directory | | `setype` | `samba_share_t` | The SELinux type of the share directory |
| `valid_users` | - | Controls read access for registered users. Use the syntax of the corresponding Samba setting. | | `valid_users` | - | Controls read access for registered users. Use the syntax of the corresponding Samba setting. |
| `write_list` | - | Controls write access for registered users. Use the syntax of the corresponding Samba setting. | | `write_list` | - | Controls write access for registered users. Use the syntax of the corresponding Samba setting. |
| `guest_ok` | - | Allow guest access. |
| `writable` | - | Writable for guests. |
The values for `valid_users` and `write_list` should be a comma separated list of users. Names prepended with `+` or `@` are interpreted as groups. The documentation for the [Samba configuration](https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html) has more details on these options. The values for `valid_users` and `write_list` should be a comma separated list of users. Names prepended with `+` or `@` are interpreted as groups. The documentation for the [Samba configuration](https://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html) has more details on these options.

View File

@ -23,6 +23,7 @@
security = {{ samba_security }} security = {{ samba_security }}
passdb backend = {{ samba_passdb_backend }} passdb backend = {{ samba_passdb_backend }}
map to guest = {{ samba_map_to_guest }} map to guest = {{ samba_map_to_guest }}
guest account = {{ samba_guest_account }}
{% if samba_interfaces|length > 0 %} {% if samba_interfaces|length > 0 %}
interfaces = {{ samba_interfaces }} interfaces = {{ samba_interfaces }}
@ -67,6 +68,12 @@
{% endif %} {% endif %}
{% if share.group is defined %} {% if share.group is defined %}
force group = {{ share.group }} force group = {{ share.group }}
{% endif %}
{% if share.guest_ok is defined %}
force guest_ok = {{ share.guest_ok }}
{% endif %}
{% if share.writable is defined %}
force writable = {{ share.writable }}
{% endif %} {% endif %}
create mode = {{ share.create_mode|default('0664') }} create mode = {{ share.create_mode|default('0664') }}
force create mode = {{ share.force_create_mode|default('0664') }} force create mode = {{ share.force_create_mode|default('0664') }}