summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-28 08:22:45 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2022-09-28 09:57:31 -0400
commitf2d071c832d4cc556f915ca2595ba958cac3a29c (patch)
treec3e6622cc5e768e940b820f19722fb2a53bea291 /doc
parent13ed651870edf99e0729ab547a7ae2691a51c971 (diff)
downloadguix-f2d071c832d4cc556f915ca2595ba958cac3a29c.tar.gz
doc: Add a simple Samba share example.
* doc/guix.texi (Samba Services): Add a configuration example.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 275b53f267..5de1fdbd8c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -31337,6 +31337,38 @@ The service type to enable the samba services @code{samba}, @code{nmbd},
 @code{smbd} and @code{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 @file{/public}
+directory.
+
+@quotation Tip
+The @file{/public} directory and its contents must be world
+readable/writable, so you'll want to run @samp{chmod -R 777 /public} on
+it.
+@end quotation
+
+@quotation 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.
+@end quotation
+
+@lisp
+(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"))))
+@end lisp
+
 @end defvar
 
 @deftp{Data Type} samba-service-configuration