There are several possibilities to share a directory from Ubuntu GNU/Linux with FreeDOS. The following one has been tested by me with Ubuntu 16.04.
Create a guest account
Note: This will create a share, that’s open to everyone who can connect with the server. Everyone is able to see, save and change files and directories.
If you haven’t already, install Samba with:
sudo apt-get install samba
Make a directory you want to share, for instance:
mkdir /home/username/share
(Exchange “username
” with the name of your Ubuntu user.)
Edit Sambas configuration file:
sudo nano /etc/samba/smb.conf
At the beginning, in section [global]
, add this line:
mangling method = hash
So “mangled” (shortened) 8.3 filenames are better to read in DOS.
At the end of the smb.conf
file add the following lines:
[publicfolder] comment = Public share for MS Client path = /home/username/share guest ok = yes browseable = yes read only = no create mask = 0644 force create mode = 0644 directory mask = 0755 force directory mode = 0755
The create
and directory
-Settings will make sure users can create and change files (but not executables) and directories.
By default, the guest user gets the account “nobody
” with the group “nogroup
” in Ubuntu. If you access the share only from remote clients, this is OK. If you want to stay with the user “nobody
“, make sure the directory is writable for him:
chmod 777 /home/username/share
If you don’t want to stay with the user “nobody
“, because you also have to read and write files into this directory from within Ubuntu, you can map the guest account to your Ubuntu user account. To do this, add this line to the [global]
section at the beginning of “/etc/samba/smb.conf
“, for instance after the line “map to guest = bad user
“:
guest account = username
(Exchange “username
” with the name of your Ubuntu user.)
Now restart Samba to apply the changes:
sudo service smbd restart
Connect to the share from FreeDOS
In FreeDOS command:
net view
net view \\ubuntu
net use F: \\ubuntu\publicfolder
With the last command you map the folder /home/username/share
on the Ubuntu machine to drive F:
in FreeDOS.
To stop using this share, type:
net use F: /delete
That’s it. Congratulations!