A common challenge with retro machines is transferring data from and to it. If the retro machine has an Ethernet adapter
that can be enabled, then sharing data via a file server is a good solution for this challenge.
Unfortunately, these old systems use protocols that are dangerous and thus disabled on any modern file server, such
as a NAS. Usually, these protocols can be re-enabled on a NAS, but I would advise against doing this.
Instead, this Gist shows how a dedicated Raspberry Pi can be used to make a file server that supports all of these old protocols.
A word of caution: Because these protocols are dangerous, never expose the Raspberry Pi to the internet! You will most
likely immediately catch a trojan, and your Pi will be used to spam out mail or become part of a botnet for denial of service attacks.
Use the Pi only in your intranet, without any port forwarding, and only to perform the dedicated task of a retro file server.
Goal: Setup a Raspberry Pi with Samba, configured such that very old clients (such as OS/2 Warp, DOS or Windows 95) can access the shares. Because such a server is insecure anyway, allow access without authentication for any user including "guest".
Start with a fresh image of Raspberry Pi OS Lite. Perform the usual initial setup (apt update/upgrade, set host name, set timezone etc.). Then:
- Create the shared data directory and allow unrestricted access to it:
sudo mkdir /media/retro && sudo chmod 777 /media/retro
- Install Samba:
sudo apt -y install samba samba-common-bin
. - Edit
/etc/samba/smb.conf
:
# Global settings
[global]
workgroup = WORKGROUP
# Set the netbios name to "retro" regardless of the server's name. This seems to work better for OS/2 clients.
netbios name = retro
# Enable logging
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
server string = File server for retro clients
# This is the default, it means that the Raspberry Pi handles security on its own.
security = user
# Allow the insecure v1 protocol
ntlm auth = ntlmv1-permitted
# Allow the very old LANMAN1 protocol, used e.g. by OS/2 or DOS.
server min protocol = LANMAN1
# Also allow the authentication protocols used by LANMAN1. Even allow plaintext auth.
lanman auth = Yes
client lanman auth = Yes
client plaintext auth = Yes
# Unknown ("bad") users are mapped to "nobody"
map to guest = Bad User
guest account = nobody
# Define the share named "retro"
[retro]
comment = Shared data for guests
path = /media/retro
writable = yes
printable = no
# Regardless of the user that actually connects, always use "pi" when accessing files on the share.
force user = pi
# New files are read/write for the owner (pi), and read for the rest
create mask = 0644
# New directories are read/write and browsable for pi, and read/browsable for others
directory mask = 0755
# Allow guest access, and non-authenticated access
public = yes
guest ok = yes
- Start samba:
sudo systemctl start nmbd
- Check if it is running:
sudo systemctl status nmbd
- Note: When I first wrote this guide, after the above steps, the Raspberry Pi created a server with its hostname as the SMB name.
This is wrong! It should have used the name from
smb.conf
("retro"). After a reboot, the correct name was used. With the Raspberry Pi OS of October 30, 2021, this no longer happened. So: If in doubt, do a reboot after the installation.
To do: Add notes for various clients. I could successfully connect anything I tried: OS/2 Warp 4.52, Windows NT 4.0, Windows 2000, Windows XP, and Windows 98. Windows 98 did not want to launch executables directly from the server, and I had to copy the files to the local disk first.
To write files to the server, use any modern client, such as a Mac with MacOS 12, or a PC with Windows 10/11.
- 2021-12-23: Fix minor typos; Retest guide for Raspberry Pi OS based on Debian version 11 (bullseye)
Thank you! This was the only solution that worked on Win98 and Samba4 for me.
I previously tried this which was creating a user account with smbpasswd, but I couldn't log in:
https://forum.ubuntuusers.de/topic/samba-4-10-windows-95-98-dos-unterstuetzung/
Anonymous access like this works fine, I can even run .exe files directly from the network share.
I also tried this config on my router with Samba 4.12, which makes Windows 98 hang for a long time when accessing directories. On the Pi with Samba 4.13 it works fine.