This weekend I have upgraded my old laptop to run Ubuntu 8.04 (Hardy Heron). The experience was suitably painless and Hardy is running smoothly. Since I’ve had my MacBook Pro, I’ve hardly opened the lid on the old laptop, it has just sat (reasonably) quietly in the corner of the room listening for SSH connections and performing downloads for me.

Under Hardy’s predecessor, Gutsy Gibbon the connection to our HTPC (which is still running Windows XP Media Center Edition) had been a little flaky, which meant that often I would transfer files between the two using an SD card rather than simply copying them using smbfs.

It turns out that smbfs has been deprecated in Hardy and the time has come for me to move over to CIFS. This was actually pretty simple, but I understand some people have struggled with the conversion, so I thought I’d document what I did here.

  1. Unmount the old smbfs mounts for the last time:
sudo umount -at smbfs
  1. Grant all users full access to the mount point:
chmod 777 /media/<mountpoint>
  1. Update /etc/fstab to use cifs rather than smbfs, changing the mask_s to _modes and ensuring that the octal modes have leading zeros, thus.

Before:

//server/share     /media/mountpoint        smbfs
auto,credentials=/etc/smbcredentials,workgroup=WORKGROUP,gid=smb,uid=1000,fmask=770,dmask=770,rw 
0       0

After:

//server/share     /media/mountpoint        _cifs_
auto,credentials=/etc/smbcredentials,workgroup=WORKGROUP,gid=smb,uid=1000,_file_mode_=_0_770,_dir_mode_=_0_770,rw
0       0
  1. Mount the CIFS mounts:
sudo mount -vat cifs

And that’s it: fast and easy!