From 8266e47963052e857611eb60361b31b5ed83751b Mon Sep 17 00:00:00 2001 From: Jota Odiceu Date: Sat, 4 Jul 2026 17:19:40 -0300 Subject: [PATCH] refactor(samba): streamline install and configure recipes Reorder and clarify Samba setup instructions across recipes. Remove redundant "Configure Samba" section from install. Consolidate "Create Samba User" in install recipe. Relocate service verification to post-restart in configure recipe. Correct 'smbd --version' command. --- recipes/samba/01_install-samba.md | 24 ++---------------------- recipes/samba/02_configure-share.md | 18 +++++++++--------- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/recipes/samba/01_install-samba.md b/recipes/samba/01_install-samba.md index 17a9cc2..110dd67 100644 --- a/recipes/samba/01_install-samba.md +++ b/recipes/samba/01_install-samba.md @@ -12,7 +12,7 @@ sudo apt install -y samba ## Verify Installation ```bash -smbd --version +sudo smbd --version ``` Expected output: @@ -39,26 +39,6 @@ systemctl status nmbd --no-pager Both services should be reported as **active (running)**. -## Configure Samba - -Replace the default configuration. - -```bash -sudo cp smb.conf /etc/samba/smb.conf -``` - -Validate the configuration. - -```bash -testparm -``` - -Expected output: - -```text -Loaded services file OK. -``` - ## Restart Samba ```bash @@ -82,7 +62,7 @@ sudo ss -tulpn | grep smb Expected output should include ports **139** and **445**. -## Create Samba User (Optional) +## Create Samba User ```bash sudo smbpasswd -a diff --git a/recipes/samba/02_configure-share.md b/recipes/samba/02_configure-share.md index 8f904fd..706679a 100644 --- a/recipes/samba/02_configure-share.md +++ b/recipes/samba/02_configure-share.md @@ -46,15 +46,6 @@ sudo chown -R : /srv/samba sudo chmod -R 775 /srv/samba ``` -## Create Samba User - -If the user does not already exist on Linux, create it first. - -```bash -sudo smbpasswd -a -sudo smbpasswd -e -``` - ## Validate Configuration ```bash @@ -74,6 +65,15 @@ sudo systemctl restart smbd sudo systemctl restart nmbd ``` +## Verify Services + +```bash +systemctl status smbd --no-pager +systemctl status nmbd --no-pager +``` + +Both services should be reported as **active (running)**. + ## Verify Share ```bash