Quantcast
Channel: Active questions tagged mount+fstab - Ask Ubuntu
Viewing all articles
Browse latest Browse all 699

How to mount SMB share via fstab? (Works with manual mount command.)

$
0
0

The following mount command works on my system:

sudo mount -t cifs //192.168.0.20/share -o user=guest,password=0,file_mode=0777,dir_mode=0777,iocharset=utf8 /mnt/mit

However, adding the equivalent fstab entry...

//192.168.0.20/share  /mnt/mit  cifs  user=guest,password=0,file_mode=0777,dir_mode=0777,iocharset=utf8  0  0

causes mount -av to hang:

$ sudo mount -avmount.cifs kernel mount options: ip=192.168.0.20,unc=\\192.168.0.20\share,file_mode=0777,dir_mode=0777,iocharset=utf8,user=,pass=********

The command never finishes.What am I doing wrong?

More details:

  • Ubuntu 16.04.1 LTS
  • cifs-utils is installed on the system.

  • When manually mounting via sudo mount -t ..., the corresponding line in/etc/mtab is:

    //192.168.0.20/share /mnt/mit cifs rw,relatime,vers=1.0,cache=strict,username=guest,domain=MIT,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.20,file_mode=0777,dir_mode=0777,nounix,serverino,mapposix,rsize=61440,wsize=65536,actimeo=1 0 0

    (Copying this into fstab leads to the same debug output and the same hanging.)


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>