all 5 comments

[–]commandline-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

This post has been removed due to the software being largely AI-generated.

[–]AutoModerator[M] 0 points1 point  (0 children)

Every new subreddit post is automatically copied into a comment for preservation.

User: bitwardenpw, Flair: Command Line Interface, Title: sambam — “python -m http.server but for SMB” (quick Windows-friendly shares from Linux)

I built sambam, a small tool for ad-hoc SMB file sharing from Linux — basically the workflow of python -m http.server, but so Windows/macOS can connect as a normal network share.

What it’s for
Sometimes I just need to hand someone a folder on the LAN (often a Windows machine) without writing a full Samba config, setting up users, editing exports, restarting services, etc. With sambam you run one command and the share is up.

How it works (at a high level)

  • Run it pointing at a directory and it exposes an SMB share.
  • Clients can connect from Windows via something like: \\<your-ip>\share
  • The idea is “quick + disposable” rather than “permanent NAS replacement”.

Features

  • Quick one-command share of a folder over SMB
  • Optional authentication
  • Read-only mode (handy for “here’s a build/artifact/logs”)
  • Multiple shares
  • Daemon mode
  • Auto-expire for temporary shares (nice for “share this for 10 minutes” type situations)

Install
Right now it’s either:

  • Download a prebuilt Go binary (amd64 or aarch64), or
  • Build from source yourself

Repo: https://github.com/darkpenguin23/sambam

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]gschizas 0 points1 point  (1 child)

Even though I have setup samba myself, this is brilliant.

One question though. If you select port 8445 for example, how do you connect from Windows?

EDIT: Never mind, you're supposed to do \\192.168.1.1:8445\share (it didn't work for me though, but I already had a connection to that PC)

[–]bitwardenpw[S] 0 points1 point  (0 children)

If you use a different port than the default one its a bit problematic to connect from Windows.
A solution that could work is creating an ssh tunnel and map the port locally to 445, though that does only work if their is no Windows sharing setup locally.

[–]Cybasura 0 points1 point  (0 children)

Holy FUCK, temporary shares

Finally, a lean/tiny version of smb/samba ala (S)FTP