(gnu services samba) module provides service definitions for
Samba as well as additional helper services. Currently it provides the
Samba provides network shares for folders and printers using the SMB/CIFS protocol commonly used on Windows. It can also act as an Active Directory Domain Controller (AD DC) for other hosts in an heterougenious network with different types of Computer systems.
The service type to enable the samba services
winbindd. By default this service type does not run
any of the Samba daemons; they must be enabled individually.
Below is a basic example that configures a simple, anonymous (unauthenticated) Samba file share exposing the /public directory.
Tip: The /public directory and its contents must be world readable/writable, so you’ll want to run ‘chmod -R 777 /public’ on it.
Caution: Such a Samba configuration should only be used in controlled environments, and you should not share any private files using it, as anyone connecting to your network would be able to access them.
(service samba-service-type (samba-configuration (enable-smbd? #t) (config-file (plain-file "smb.conf" "\ [global] map to guest = Bad User logging = syslog@1 [public] browsable = yes path = /public read only = no guest ok = yes guest only = yes\n"))))
Configuration record for the Samba suite.
The samba package to use.
The config file to use. To learn about its syntax, run ‘man smb.conf’.
The WSDD (Web Service Discovery daemon) implements the Web Services Dynamic Discovery protocol that enables host discovery over Multicast DNS, similar to what Avahi does. It is a drop-in replacement for SMB hosts that have had SMBv1 disabled for security reasons.
Service type for the WSD host daemon. The value for this service type is a
wsdd-configuration record. The details for the
wsdd-configuration record type are given below.
This data type represents the configuration for the wsdd service.
The wsdd package to use.
Only listen to IPv4 addresses.
Only listen to IPv6 addresses. Please note: Activating both options is not possible, since there would be no IP versions to listen to.
Chroot into a separate directory to prevent access to other directories.
This is to increase security in case there is a vulnerability in
Limit to the level of hops for multicast packets. The default is 1 which should prevent packets from leaving the local network.
Limit to the given list of interfaces to listen to. By default wsdd will listen to all interfaces. Except the loopback interface is never used.
The WSD protocol requires a device to have a UUID. Set this to manually assign the service a UUID.
Notify this host is a member of an Active Directory.
Manually set the hostname rather than letting
wsdd inherit this
host’s hostname. Only the host name part of a possible FQDN will be used in
the default case.
wsdd will convert the hostname in workgroup to all
uppercase. The opposite is true for hostnames in domains. Setting this
parameter will preserve case.
Change the name of the workgroup. By default
wsdd reports this
host being member of a workgroup.