parse_dfs_path_strict: can't parse hostname from path \<ip/fqdn>

Open
#91 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
docker, docker-compose, shell

Research direction

Start by comparing the repository's smb.conf with the mounted /etc/samba/smb.conf in the Docker Compose setup, then reproduce the DNS and IP connection attempts on Alpine 3.23. Review the parse_dfs_path_strict log output and the effects of hostname and host msdfs settings. Done means identifying the configuration or container change that allows the existing share to connect successfully from macOS or iOS.

Written by the indexing model from the issue text.

Description

Everything works normally when i don't mount a custom smb.conf in the container. When i do, i get these errors in the docker logs:

Using provided configuration file: /etc/samba/smb.conf.
smbd version 4.23.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2025
parse_dfs_path_strict: Hostname smb.example.com is not ours.
parse_dfs_path_strict: Hostname smb.example.com is not ours.
parse_dfs_path_strict: can't parse hostname from path \smb.example.com
parse_dfs_path_strict: Hostname 192.168.202.10 is not ours.
parse_dfs_path_strict: Hostname 192.168.202.10 is not ours.
parse_dfs_path_strict: can't parse hostname from path \192.168.202.10

This is two attempts, once via DNS, once via IP.
When i connect from macOS, i get this error:

There was a problem connecting to the server “smb.example.com”.
The share does not exist on the server. Please check the share name, and then try again.

(The share name is correct, also tested on iOS)

My docker compose:

services:
  samba:
    image: dockurr/samba
    container_name: samba
    restart: unless-stopped
    environment:
      - NAME
      - USER
      - PASS
      - UID
      - GID
    ports:
      - "445:445"
    volumes:
      - ${STORAGE_PATH}:/storage 
      - ${SMB_CONF_PATH}/smb.conf:/etc/samba/smb.conf

the mounted smb.conf is simply the one from this repo. I've also tried a few different ones without results. I'm running alpine 3.23

Please note that when i add hostname: smb.example.com to the compose like proposed in #50, that error goes away, but the one from the title remains and i still cannot connect. In fact, when i add host msdfs = no to the smb.conf, there's nothing in the logs, but i still get the same error on the client when trying to connect.

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.