From 47cfe81aa6e4f2cbc49608edc22124e1f07fb2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Tue, 20 Oct 2026 07:54:44 +0000 Subject: [PATCH] samba: doc --- cookbooks/samba/README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/cookbooks/samba/README.md b/cookbooks/samba/README.md index 206d981..ea08297 100644 --- a/cookbooks/samba/README.md +++ b/cookbooks/samba/README.md @@ -39,6 +39,18 @@ Verify Samba is running: sudo systemctl status samba.service ``` +Define a password for a user to access the Samba shares: + +```sh +sudo podman exec -it samba smbpasswd -a john +``` + +Get a list of currently defined users: + +```sh +sudo podman exec -it samba pdbedit -L +``` + Test connectivity from a client: ```sh @@ -48,7 +60,13 @@ smbclient -L //localhost -N Connect to a share: ```sh -smbclient //localhost/sharename -U username +smbclient //localhost/sharename -U john +``` + +Add a share to `/etc/fstab` to mount it on boot: + +```fstab +//localhost/sharename /mnt/sharename cifs username=john,password=yourpassword 0 0 ``` Restart the **samba.target** unit.