Feature Request: Improve Samba Configuration Management

Open Beginner friendly
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, shell
Domain
backend

Research direction

Start by reading the Dockerfile and the scripts that generate or load /etc/samba/smb.default and /etc/samba/smb.conf; the issue does not name those entry points. Check how Samba handles include directives and how the image is built. Done means the default configuration includes an optional /etc/samba/my-smb.conf while the existing defaults remain in place; verify with a mounted custom configuration.

Written by the indexing model from the issue text.

Description

The default configuration could automatically include an optional custom configuration file:

include = /etc/samba/my-smb.conf

Users would only need to mount their custom configuration:

volumes:
  - ./my-smb.conf:/etc/samba/my-smb.conf

/etc/samba/
├── smb.default
├── smb.conf
└── my-smb.conf

The main benefit is separating common configuration from user-specific configuration.

The project should maintain common Samba settings and defaults, while users should only need to manage the settings they want to customize.

My current Dockerfile:

FROM dockurr/samba:latest

RUN sed -i '/^exec smbd/i \
if [ "${NMBD_ENABLE:-0}" = "1" ]; then\n\
    echo "Starting nmbd..."\n\
    nmbd --configfile="$config" --daemon\n\
fi\n' /usr/bin/samba.sh

RUN sed -i '/^\[global\]/a include = /etc/samba/my-smb.conf' /etc/samba/smb.default

RUN sed -i '/^\[Shared\]/,/^\[/ { /^\[Shared\]/d; /^\[/!d; }' /etc/samba/smb.default
Dominant language
Shell
Stars
840
Forks
64
PR merge metrics
No merged PRs in 30d

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dockur/samba

All issues in dockur/samba

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.