Forge Home


Install, manage and configure samba server, client and shares.


121 latest version

4.7 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 3.1.0 (latest)
  • 3.0.0
  • 2.0.1
  • 2.0.0
  • 1.4.1
  • 1.4.0
  • 1.3.1
  • 1.3.0
  • 1.2.0
  • 1.1.0
  • 1.0.0
released Jun 27th 2024
This version is compatible with:
  • Puppet Enterprise 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
  • Puppet >= 7.0.0 < 9.0.0
  • , , OracleLinux, Scientific, Fedora, Rocky, AlmaLinux, , , , ArchLinux

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'rehan-samba', '3.1.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rehan-samba
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rehan-samba --version 3.1.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Tags: samba, smb, cifs, wins


rehan/samba — version 3.1.0 Jun 27th 2024


Puppet Forge Build Status

Table of Contents

  1. Overview
  2. Module Description
  3. Setup
  4. Usage
  5. Dependencies
  6. Development


The rehan-samba module manages the Samba/CIFS, the virtual filesystem based on SMB protocol.

Module Description

A puppet module for managing the installation and configuration of samba. This module installs and configures the samba server and client packages and allows configuration of user specific SMB shares.

Implemented Features:

  • Installs samba server package
  • Installs samba client package
  • Allows managing global SMB configurations parameters.
  • Allows managing SMB shares.


In order to install rehan-samba, run the following command:

$ puppet module install rehan-samba

The module does expect all the data to be provided through 'Hiera'. See Usage for examples on how to configure it.


This module is designed to be as clean and compliant with latest puppet code guidelines.


Example Usage for Samba Server (puppet dsl)

    class { 'samba':
      package_ensure       => 'installed'
      os_level             => 50,
      workgroup            => 'EXAMPLE',
      wins_server          => '',
      server_string        => 'Example File Server 01',
      netbios_name         => 'F01',
      interfaces           => [ 'lo', 'eth0' ],
      hosts_allow          => [ '127.', '192.168.' ],
      hosts_deny           => [ 'ALL' ]
      local_master         => 'yes',
      preferred_master     => 'yes',
      map_to_guest         => 'Bad User',
      additional_config    => {
        server_multi_channel_support => 'yes'
      shares => {
        'homes' => {
          comment    => 'Home Directories',
          browseable => false,
          path       => '/home',
          writable   => true,
        'pictures' => {
          comment        => 'Pictures',
          path           => '/srv/pictures',
          browseable     => true,
          writable       => true,
          create_mask    => '1777',
          directory_mask => '1777',

Example Usage for Samba Client (puppet dsl)

contain samba::client

Example Usage (hiera)

All of this data can be provided through Hiera.


samba::package_ensure: 'installed'
samba::os_level: 50
samba::workgroup: 'EXAMPLE'
samba::wins_server: ''
samba::server_string: 'Example File Server 01'
samba::netbios_name: 'F01'
   - 'lo'
   - 'eth0'
   - '127.'
   - '192.168.'
   - 'ALL'
samba::local_master: 'yes'
samba::preferred_master: 'yes'
samba::map_to_guest: 'Bad User'
samba::firewall_manage: true
  server_multi_channel_support: 'yes'
    comment: 'Home Directories'
    browseable: false
    path: '/home'
    writable: true
    comment: 'Pictures'
    path: '/srv/pictures'
    browseable: true
    writable: true
    create_mask: '1777'
    directory_mask: '1777'
    backend: 'tdb'
    range: '400-999'
    unix_primary_group: 'Yes'
    unix_nss_info: 'Yes'
    schema_mode: 'rfc2307'
    range: '1000-2147483647'
    backend: 'ad'



You can submit pull requests and create issues through the official page of this module on GitHub. Please do report any bug and suggest new features/improvements.