Mounting CIFS shares

13 Aug, 2007  |  Posted by Danesh  |  in Linux

I was playing around with Samba and CIFS mounts last night.

I needed to mount a directory on my openSUSE 10.2 box to my samba server where all my mp3 are stored. Since smbfs will be dropped soon I decided to go with CIFS. Note, smbfs will depreciated starting with kernel version 2.6.20.

There are 2 ways to mount, examples below.

The first method shown below is normally used for temporary mounts. Mounts will be discarded upon reboot or execution of the umount command.

mount -t cifs -o rw,guest,noperm //10.0.0.200/Mp3 /mnt/mp3 umount

/mnt/mp3 (this will unmount)

If you are looking for a permanent mount, you will need to add the following line into your /etc/fstab file.

//10.0.0.200/Mp3 /mnt/mp3 cifs rw,guest,noperm

Options I used for my mounts,

rw - read write access. My shares are public so everyone has read/write access.
guest - no password prompt.

noperm - client does not perform permission checks. Needed if uid and gid are not the same on client and server.

Sources:

Linux CIFS client guide by Steve French

  • Digg
  • del.icio.us
  • BlinkList
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Furl
  • Google
  • Live
  • Facebook
  • Pownce
  • TwitThis
  • E-mail this story to a friend!
  • LinkedIn
  • Ping.fm
Tags: ,

One Response so far | Have Your Say!

  1. Automount : The Danesh Project  |  August 14th, 2007 at 2:03 am #

    [...] to drop my permanent mounts and go with automount instead. Why? Well I don’t access those folders all the time, they are [...]

    Automount : The Danesh Project - Gravatar

Leave a Feedback

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>