Tag search

Automatically mounting and unmounting Samba/Windows shares with CIFS

by Sander Marechal

Last updated on 2007-12-03@23:55. At my work the employees are in the fortunate position that they are free to choose whatever OS they want to work with. At the moment the default is still Windows XP but you are free to wipe the drive and install whatever you feel—as long as you can do your job properly. And there is work underway to roll our own distribution for internal use. You're even free to bring in your Mac (but we won't supply you with one). The only thing that's banned (unofficially) so far is Windows Vista. Server-side we run a mixture of Linux and Windows, and the thend is to replace broken Windows machines by Linux machines if possible. In such a heterogeneous environment it makes sense to share our files through Samba. It's one of the few protocols that any OS can speak.

If you're running Windows Server 2003 then you can't use the smbfs driver that most Linux distributions ship by default. Sorry, no "Places » Connect to server" for you GNOME folk. You'll need to use the CIFS filesystem driver and you'll need to edit /etc/fstab. Adding the required fstab entries is actually quite easy as I will show below, but on Debian and it's derivative distributions you get a nasty error when you subsequently try to reboot or shutdown your machine, which hangs for about 30 seconds waiting for a timeout:

CIFS VFS: No Response for Cmd <number> mid <number>

It took me quite a bit of time to properly solve that one, but in the end it turned out to be quite simple. I will show you later in the article, but let's start mounting first.

Linux: making small businesses possible

by Sander Marechal

Here at Lone Wolves we do more than just blog and write open source software. We have a small company as well and we build websites for equally small businesses in the area. It's nothing big, not even full time, but it pays for this website and the servers we need to keep our projects running. It's Linux that made this possible. If we would have been stuck on the Windows platform there is no way we could have done what we do because it would simply have been too expensive.

I am sure the same is true for many start-ups. Hardware prices have been going down over the years but the cost of proprietary software has only risen. Start-ups need much more of an IT infrastructure to get going and the license costs are dragging them down. It is no coincidence that virtually all the successful start-ups of today are powered by open source software.