The Crane Has Landed


Mounting and unmounting Samba shares over CIFS
June 3, 2008, 10:12 pm
Filed under: Ubuntu | Tags: , , ,

CIFS is apparently better than SMBFS for mounting shares across a network in Ubuntu.  To set up fstab to automatically mount a share (with read/write access):

  1. apt-get install smbfs
  2. Create a file called .smbcredentials in the /root folder containing the lines:
    username=[your username]
    password=[your password]

    Then chmod 700 that file so that only root can access it.

  3. For each share, add the line:
    //Server/Sharename  /[local mountpoint]  cifs  credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0777,dir_mode=0777  0  0

Done.  However, to make sure you don’t get the CIFS VFS: Server not responding error, execute:
ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh


No Comments Yet so far
Leave a comment



Leave a comment
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>