samba server #2

Supports: xenial bionic cosmic

Add to new model

Description

Installs the Samba CIFS server, and configures local folders to be available as shares to users.


Samba

Describe the intended usage of this charm and anything unique about how this
charm relates to others here.

This README will be displayed in the Charm Store, it should be either Markdown
or RST. Ideal READMEs include instructions on how to use the charm, expected
usage, and charm features that your audience might be interested in. For an
example of a well written README check out Hadoop:
http://jujucharms.com/charms/precise/hadoop

Use this as a Markdown reference if you need help with the formatting of this
README: http://askubuntu.com/editing-help

This charm provides [service][]. Add a description here of what the service
itself actually does.

Also remember to check the [icon guidelines][] so that your charm looks good
in the Juju GUI.

Usage

juju deploy cs:~pirate-charmers/samba-server

Known Limitations and Issues

  • Passwords can not be set using charm configuration, and must be set on each unit, using the set-user-pass action

Configuration

smb-shares

A Comma separated list of folders to share. Optionally, flags can be set on each share by separating with commas - e.g. /mnt/storage:ro:guest:browsable:write=ubuntu to configure a storage share, that is read only, guest accessible and browsable, and only writable by the ubuntu user.

smb-browsable

Shares are browsable by default, but can be disabled by setting this to false.

smb-guest

The configured shares allow guest access by default, but this can be disabled by setting this to false.

smb-read-only The configured shares are not read only by default, but can be configured as read only by setting this to true.

smb-create-mask

The default mask applied to created files. Defaults to 0660

smb-dir-mask

The default mask applied to created directories. Defaults to 0770

smb-users

A comma separated list of users to create in Samba's user database. Passwords will be automatically generated, and will need to be set to something known using the set-passwd action. No users are created by default.

smb-force-group `smb-force-user'

For the local UNIX group and user to be used for file operations on backend storage respectively. Optional, will not be set if these settings are unset.

smb-force-dir-mask smb-force-mask

If set, forces the create mode for new directories or files created by Samba, respectively. This is OR'd with smb-dir-mask and smb-create-mask by Samba when new files are created to determine the final directory of file mask.

smb-write-list

If configured, the provided comma separated list of users will be able to write to shares. These users need to exist in the samba user database, which can be configured with the smb-users setting

smb-custom

Raw configuration to append to smb.conf, provide key=value comma separated keys. Use semicolon to separate shares

Contact Information

This charm is written and maintained by the pirate-charmers group.

Samba


Configuration

smb-browsable
(boolean) Shares are browsable by default
True
smb-create-mask
(string) The default mask applied to created files
0660
smb-custom
(string) Raw configuration provide key=value comma seperated keys semicolon seperated shares
smb-dir-mask
(string) The default mask applied to created directories
0770
smb-force-dir-mask
(string) The folder create mode which is forced on new directories by Samba. This is OR'd with smb-dir-mask by Samba when new files are created to determine the mask.
smb-force-group
(string) If configured, the provided group name will be assigned as the local UNIX group name used for any connected user
smb-force-mask
(string) If set, forces the create mode for new files created by Samba. This is OR'd with smb-create-mask by Samba when new files are created to determine the mask.
smb-force-user
(string) If configured, the provided user name will be assigned as the local UNIX user account used for any connected user
smb-guest
(boolean) The configured shares allow guest access by default
True
smb-read-only
(boolean) The configured shares are read only by default
smb-shares
(string) Comma separated list of folders to share. Optionally, flags can be set on each share by separating with commas - e.g. /mnt/storage:ro:guest:browsable:write=ubuntu to configure a storage share, that is read only, guest accessible and browsable, and only writable by the ubuntu user.
smb-users
(string) A comma separated list of users to create in Samba's user database. Passwords will be automatically generated, and will need to be set to something known using the set-passwd action. NOTE: If you remove users, and do not redeploy the juju units, you need to use the remove-user action for each removed user.
smb-write-list
(string) If configured, the provided comma separated list of users will be able to write to shares. These users need to exist in the samba user database, which can be configured with the smb-users setting
system-additional-groups
(string) Comma separated list of groups to create. User accounts will not be created
system-additional-users
(string) Comma separated list of users to create. Groups with the same name will be created.
system-gidmap
(string) Ensure the provided groups, comma separated, have the GID specified after '='. e.g. ubuntu=1000,storage=1001
system-group-membership
(string) Ensure the users provided, comma separated, are members of the provided groups, colon separated, following '='. e.g. ubuntu=sudo:wheel,storage=storage,sudo
system-uidmap
(string) Ensure the provided users, comma separated, have the UID specified after '='. e.g. ubuntu=1000,storage=1001