In this chapter we use MS Client to connect to a samba share on a GNU/Linux machine. In our example this is Debian GNU/Linux “Jessie”.
FreeDOS should be configured with a “Bridged Adapter” in VirtualBox networking. It should be booted with option 5 (TCP/IP). You don’t have to start anything else yet.
At first we need to create the share on the GNU/Linux machine:
1. Create a share
Open a GNU/Linux terminal and type as root:
DOS will not login with a user name, so make the folder owned by “nobody”:
chown nobody:nogroup /home/share
With “chmod” set the UNIX permissions for the directory recursively (-R) for all (a) to “read” (r), “write” (w) and special execute (X). The “X” makes only directories executable (able to open), but not files. So command as root:
chmod -R a+rwX /home/share
2. Configure Samba
In our example we use a very simple smb.conf. DOS doesn’t use usernames and passwords to limit the access to files. Instead it allows or disallows access to shares. Now command as root:
[global] workgroup = WORKGROUP lanman auth = yes client lanman auth = yes bind interfaces only = No map to guest = Bad user mangle prefix = 6 [share] path = /home/share comment = simple share guest ok = yes guest only = yes public = yes browseable = yes writeable = yes read only = no create mask = 0644 directory mask = 0777 delete readonly = Yes dos filemode = Yes ; I added the following for MacOSX: veto files = /._*/.DS_Store/
Basically this means everybody is allowed to read and write to “/home/share”. Username and group are forced to be “nobody” and “no group”, so at least there is not much you can do with it.
In GNU/Linux restart samba:
If you haven’t already done it, boot up the FreeDOS image in VirtualBox with option 5 (MS Client with TCP/IP).
In FreeDOS command:
to see the other computers in your workgroup.
As you can see above, the GNU/Linux machine is called Debian8m. So let’s make a connection:
net use F: \\debian8m\share
In FreeDOS please start the Norton Commander Clone “Volkov Commander” with “nc”. Then change to drive “F:” by pressing ALT+F1.
You can now use the same share in the FreeDOS virtual box guest and your host system.
If you want to end the connection, type (in FreeDOS):
net use F: /delete