Skip to content

Repository files navigation

SMB Mounter

SMB Mounter Screenshot

A lightweight Windows GUI that scans your local network for SMB shares and lets you connect them as drive letters comfortably – without having to click through Windows' own "Map Network Drive" dialog.

Why

If you run multiple NAS boxes, Raspberry Pis, or other Samba servers on your home network, you know the problem: shares appear and disappear, you have to remember credentials for each one, and Windows Explorer often doesn't show what's actually connected. SMB Mounter turns that into a single overview – with a scan that actually finds what's on the network, and a status that is guaranteed to match reality.

Features

  • Automatic network scan – searches all local subnets in parallel (TCP port 445), finds SMB hosts via reverse DNS/NetBIOS and lists their shares via net view.
  • Credentials per server, not per share – since Windows/Samba only allow one SMB session per server and user at a time anyway, shares on the same host are grouped under a shared login.
  • Passwords stored exclusively in Windows Credential Manager (DPAPI via keyring) – never in plain text, never Base64, never in a file.
  • Connect without a drive letter – one click opens any share directly by its UNC path in Explorer, without using up one of the 26 available letters.
  • Live status verification – a background check continuously verifies against the real net use output whether a share is actually connected. If the state changes from outside (Windows Explorer, another tool, a dropped connection), the tool reflects that immediately – the displayed status is never just a guess.
  • Persistent drive letter assignment – once a drive letter is manually assigned, it stays assigned, even across restarts and repeated scans. No automatic assignment, no duplicate assignment.
  • Verification info column – MAC address with vendor lookup, NetBIOS name, share type/comment, and open extra ports (HTTP/HTTPS/SSH) help you identify unknown hosts or shares before connecting to them.
  • Robust against real-world server quirks – automatically detects when a Synology or Samba server rejects net view by IP address, and falls back to querying the NetBIOS name instead.

Screenshot walkthrough

The screenshot above shows a typical session: several servers (NasServer2, REMOTE-HOST, another host) with their respective shares. Already-connected shares are marked green with "already connected"; the server header rows show vendor, MAC address, and open ports for verification.

Installation

Requirements: Windows 10/11, Python 3.14 (tested; imgui_bundle needs a version with prebuilt wheels for your specific Python version).

pip install -r requirements.txt
python smb_mounter.py

The network scan starts automatically when the program launches.

A prebuilt, standalone SMB_Mounter.exe is also available (no Python needed, no installer) – see BUILD.md to build it yourself.

Security

  • Passwords are stored exclusively via keyring in Windows Credential Manager (backend: WinVaultKeyring, DPAPI) – decryptable only under the current Windows user account.
  • Usernames are stored unencrypted in credentials.json (not considered sensitive).
  • There is no configuration option to store passwords in plain text, Base64, or with a hardcoded key – that is deliberately not supported.

Technology

  • GUI: imgui_bundle + immapp (Dear ImGui bindings with prebuilt wheels for current Python versions, no compiler needed)
  • Network scan/share listing: plain Windows tools (net view) via subprocess
  • Mount with credentials: the WNetAddConnection2 WinAPI (via pywin32) – the password never ends up as a command line argument of an external process, but is passed directly as an API parameter in process memory. Disconnecting (unmount()) still uses net use ... /delete, since no password is involved there.
  • No administrator privileges required

A complete technical reference (every module, every mechanism, all known bugs with their fix and regression test) is in ARCHITECTURE.md.

Tests

The project ships with a test suite of 113 tests (default run; 120 total incl. slow/HIL markers) – unit, mock, regression, integration, end-to-end, and hardware-in-the-loop tests against the real home network (read-only, no destructive mount operations). Details in tests/README.md.

.\run_tests.ps1              # fast: unit/mock/integration tests (< 1s)
.\run_tests.ps1 -Mode E2E     # also launches the real program (~20s)
.\run_tests.ps1 -Mode HIL     # also tests against the real home network (read-only)

run_tests.ps1 automatically installs requirements-dev.txt if needed.

Privacy

SMB Mounter does not send data to third parties by default – with one exception: to identify the vendor of unknown MAC addresses, the api.macvendors.com service is queried once per unknown prefix, and the result is cached locally forever. Details, background, and how to disable this are in PRIVACY.md.

Not supported

  • No Linux/macOS support (uses Windows-specific net use/net view/Credential Manager APIs)
  • No automatic re-mount at Windows startup – that's handled by Windows' own /persistent:yes mechanism once a share has been connected

Disclaimer

This program is provided "as is" without any warranty (see also sections 15/16 of the GNU GPLv3). In particular:

  • Use only on your own network. The network scan sends TCP connection attempts and NetBIOS/net view requests to every host on the local subnet. Only use this tool on networks you have permission to scan (your own home network, or a network with explicit consent from its operator). Scanning networks you don't own or have authorization for may violate their terms of use or applicable law.
  • Mount operations change system and registry state. The program connects network drives via the WNetAddConnection2 Windows API, or (for disconnecting and for the network scan) via net use/net view, and writes an entry under HKCU\...\Explorer\MountPoints2 (for a correct Explorer display label). It does not modify or delete files on the connected shares themselves, but connecting/disconnecting drive letters can overwrite existing, otherwise-configured assignments if the same letter is already in use.
  • No liability for data loss, misconfiguration, or lost availability. The authors accept no responsibility for damages arising from the use of this program – including, but not limited to, incorrectly assigned drive letters, interrupted network connections, or unintentionally stored credentials.
  • Use at your own risk.

License

GNU General Public License v3.0 © 2026 Jörg Simbrig.

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. The full license text is in LICENSE.

About

Findet SMB-Freigaben im Heimnetz und verbindet sie als Laufwerksbuchstaben - ohne den Windows-Dialog. Passwoerter sicher via WNetAddConnection2/Windows Credential Manager.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages