The intent of this article is to address a very specific case – it is not meant as a best practices guide.
Scenario:
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.
- Share a folder
Optional Installation
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)
- Mark
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
Under the [global] section:
- 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
Linux side
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.
Windows side:
(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
Notes
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.
Hi.
Just wanted to say thanks for this guide. I screwed up our Windows 2003 raid server while trying to make a backup of the OS partition (still not sure how this happened). Anyway, it wouldn’t boot but all the partitions/files were there. I knew there must be a way to use a live CD to get everything temporarily back on the network, but I didn’t exactly know how to do it. Your guide saved my ass. Thanks a ton.
Now if you only had a guide describing how to fix an ‘Error Loading Operating System’ message….
Thanks again!
Glad it was helpful to someone. As for your other error, if you don’t find a solution, post it on ServerFault – someone there will probably be able to help you out. (RAID complicates things a bit – but the cause will probably come down to the device your BIOS is loading, the drive geometry, the data on the boot sector, and/or the bootloader itself. Solutions may include
fixmbr,fdisk /mbr, and explicitly ensuring the drive uses LBA.Thanks.
This article is very helpful. My hard disk is damaged and I could not boot into Windows and Ubuntu installed on that drive. After going through the steps above, I am now able to move data from old hard drive to my new one!
Glad you found it useful, thanks for the comment.
Can I re-publish this article on my blog?
I will write in my own words and will include screenshots.
I will include the backlink to this article.
If you insist, I will post as a Guest Article on your name, along with Copyright notice.
I believe, this site does not publish on any illegal stuff.
Let me know your opinion.
Regards,
DaxServer
Thanks for your interest. You are most welcome to re-publish the article, in your own words, on your blog. A link as part of the article would be appreciated, but is not required.