Listen to the Joystiq Podcast (because your ears can't read)

HOWTO use CIFS instead of SMBFS

Well, I just spent a few frustrating hours the other night, & I wanted to help prevent the same from happening to any of you. I was trying to use SMBFS to mount a Samba share, & it just wasn't working. Samba was set up on Chaucer (whose IP is 192.168.0.25), & I was sharing the music directory, & I could connect via smbclient, so I thought everything was good. I tried mounting with this line:

smbmount //192.168.0.25/music /home/scott/chaucer_music/ -o credentials=/home/scott/credentials,fmask=644,dmask=755, uid=1000,gid=1000,workgroup=HOME

Seemed to work just fine. But Konqueror wouldn't display the contents of /home/scott, & just showed a blank screen (!), while ls ~/ on the CLI finally, after a minute or so, gave me this error message:

ls: chaucer_music: Input/output error

The only solution was to unmount the share:

sudo umount /home/scott/chaucer_data

Unfortunately, sometimes that didn't even work, & I had to pull out the big guns (normally, this is NOT a good idea, but when ya have to, ya have to):

sudo umount -l /home/scott/chaucer_data

Damn! So what was the problem?

The problem is that SMBFS is basically screwed up & orphaned. The guy who was the maintainer - Urban Widmark - has basically dropped off the face of the earth, is no longer taking emails, & has evidently essentially said "screw you guys" to all the people who were using & depending upon SMBFS (ya know, I'd understand if something came up, but just to vanish without apology or explanation is pretty crappy behavior). So what do we use instead? CIFS. Which is supported. Which is in the kernel. Which is what you should be using NOW.

To use it, first make sure that have a DNS server set up at home (As if! Suuuuure ya do!) or, more likely, edit your /etc/hosts file so there's an entry in it for the machine that has the share on it. Like this:

192.168.0.25 chaucer

You'll need a directory that will serve as your mount point. Above, in the smbmount line, I was using a directory I'd already created: /home/scott/chaucer_music. That's fine.

Now that you're set up, this line should work:

sudo mount -t cifs -o credentials=/home/scott/credentials,uid=1000,gid=1000,domain=HOME,port=139,rw //chaucer/music /home/scott/chaucer_music

Bingo. Works perfectly. I can also add it to my /etc/fstab file, if I so feel like:

//chaucer/music /home/scott/chaucer_music cifs exec,credentials=/home/scott/credentials,uid=1000,gid=1000,rw 0 0

Whew! Like I said, I hope that helps someone! If it saves you 2 hours, then it will have been worth it!

(Check out all of our posts on Samba, SMB, & mounting.)

concepts
blogging (1)
books (2)
howto (0)
humor (1)
licensing (0)
networking (2)
odf (1)
presentations (1)
programming (1)
review (2)
rss (1)
security (6)
switching (0)
wireless (1)
distros
auditor (1)
debian (2)
fedora core (2)
k/ubuntu (12)
knoppix (2)
libranet (1)
mac os x (2)
solaris (1)
suse (3)
format
flac (1)
mp3 (1)
odf (0)
ppt (0)
hardware
cpu (0)
dvd (1)
keyboard (1)
mouse (1)
printing (1)
microsoft
bullying (0)
ntfs (1)
office (2)
windows (3)
multimedia
imagemanagement (1)
music (3)
podcast (1)
rip-mix-burn (1)
video (0)
people
daveraggett (1)
ericmeyer (1)
software
amarok (0)
azureus (3)
bash (4)
bittorrent (4)
bloglines (1)
clamav (1)
css (1)
ethereal (1)
firefox (11)
gmail (1)
gnome (3)
html (1)
java (2)
kde (2)
kmail (1)
openoffice.org (3)
picasa (1)
regex (1)
rubyonrails (1)
ssh (3)
thunderbird (0)
vim (3)
vmware (0)
wordpress (1)
companies
google (2)
microsoft (0)
novell (0)
red hat (0)
sun (1)

RESOURCES

RSS NEWSFEEDS

Powered by Blogsmith

Other Weblogs Inc. Network blogs you might be interested in: