The intent of this article is to address a very specific case – it is not meant as a best practices guide.
A. You have a windows computer (Computer 1) with files that are remotely accessed from second windows computer (Computer 2). B. Access from Computer 2 is via a program that expects the files to be accessible under a specific computer name and share name. C. Computer 1 is currently unable to boot Windows (but has no relevant hardware problems – i.e. can still boot a LiveCD)
The solution I used was to boot up a Linux live CD, and share the files – changing the computer name to match the original, and giving the Samba share the same name. It worked seamlessly from the Windows end, and is fairly easy to setup – didn’t have to install a thing.
Linux Mint is my preferred Linux Desktop operating system, so I used a LiveCD of Linux Mint 12 (I presume Ubuntu 11.10 would be nearly identical). It should be noted that you can use UNetBootIn to create a bootable USB drive instead of using an actual CD.
Linux Mint 12 already has Samba installed, so once it boots up, there are only 3 tasks needed:
- Create a Samba user
- Change your Workgroup name and ‘Computer Name’ (aka the NetBios Name)
- If you use the default workgroup, and do not require a specific ‘Computer Name’, you can skip this step.
If your specific scenario does not require the computer name to be something specific (i.e. ‘Mint’ will do), you can avoid using the terminal altogether:
- Open Synaptic
- Reload the packages (necessary for some packages to be displayed)
system-config-sambafor installation, and apply
A second optional install is
gnome-network-admin which will let you change your hostname (which the NetBIOS name is obtained from) – however, I find it more successful explicitly setting this value.
Create a New Samba User
Open a terminal and run:
sudo smbpasswd -a mint
The username needs to match a linux user – and mint is the user the live CD runs as. The command prompts for a password – set one of your choosing (doesn’t need to match anything).
(If you installed system-config-samba, you can create a new user under Preferences > Samba Users)
Change your workgroup and computer name
gksudo gedit /etc/samba/smb.conf
- Change the line ‘workgroup = WORKGROUP’ to specify your chosen workgroup.
- Add the line ‘netbios name = computer-name’
If you make changes to smb.conf, restart samba:
sudo service smbd restart
If you changed the netbios name, restart the NetBIOS server:
sudo service nmbd restart
That is it for the terminal commands.
(If you installed system-config-samba, you can change the workgroup under Preferences > Server Settings)
Share a Folder
Open the file manager (Nautilus) and mount the volume of interest (just click it on the left pane)
- Navigate to the folder you want to share
- (If you are sharing the entire volume, navigate to /media – the volume you mounted should be listed)
- Right click the directory
- Select ‘Sharing Options’
- check ‘Share this folder’
- Set the ‘Share name’ of your choosing.
- Click ‘Create Share’
That’s all there is to it – a few steps, a few minutes, and relatively painless.
(I am presuming here that you had file sharing setup before)
- Click Network (in explorer) and reload (F5) the view
- Your remote computer should be displayed, double click it
- The share you setup should be displayed, double click it
- You should be prompted for your network password – enter ‘mint’ for the username, and the password you setup previously
… and everything should be ready to go
A point of mention – if you are not prompted for the password on Windows; check for entries under:
Start > Run > rundll32.exe keymgr.dll, KRShowKeyMgr
If there aren’t any, then try a restart to clear those stored in memory.
As a side note – I always find it amazing how much simpler things end up being than they start out. The steps I originally followed were at least twice as long – but most were simply unnecessary.