[SOLVED] "mount -t cifs" isn't working

Hi,

I know there is mount.cifs for direct mounting cifs, but maybe not everybody knows it and also I would like to use the default well known mount -t command for that, so here is the quite simple how to for that.

Issue:
mount the cifs (samba share) isn’t working

root@turris:~# mount -t cifs //raspi/storage/ /mnt/raspi/
mount: wrong fs type, bad option, bad superblock on //raspi/storage/,
missing codepage or helper program, or other error
(for several filesystems (e.g. nfs, cifs) you might
need a /sbin/mount. helper program)

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

according to error, the /sbin/mount.cifs is missing

solution:
create the symlink for mount.cifs binary from /usr/sbin into /sbin

root@turris:~# ln -s /usr/sbin/mount.cifs /sbin
root@turris:~# ll /sbin/mount.cifs
lrwxrwxrwx 1 #root root 20 Dec 31 17:49 /sbin/mount.cifs -> /usr/sbin/mount.cifs

root@turris:~# mount -t cifs //raspi/storage/ /mnt/raspi/
Password for root@//raspi/storage/:
root@turris:~# mount |grep raspi
//192.168.0.99/storage/ on /mnt/raspi type cifs (rw,relatime,vers=1.0,cache=strict,username=root,domain=RASPBERRYPI,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.99,unix,posixpaths,serverino,mapposix,acl,rsize=1048576,wsize=65536,actimeo=1)

4 Likes

Having Difficulty with CIFS can anyone help?

I am running the following

root@turris:~# mount -t cifs //192.168.0.30/dev/md4/shares/LXC /mnt/LXC -a -o us
ername=user,password=password,sec=ntlm,file_mode=0644,unc=\\192.168.0.30
dev\md4\shares\LXC

This is the dump from running mount on my NAS box

rootfs on / type rootfs (rw)
/dev/root on /old type cramfs (ro,relatime)
proc on /old/proc type proc (rw,relatime)
none on /old/sys type sysfs (rw,relatime)
/dev/md0 on / type ext3 (rw,noatime,errors=continue,data=writeback)
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
/dev/pts on /dev/pts type devpts (rw,relatime,mode=600)
tmpfs on /dev/shm type tmpfs (rw,relatime)
/dev/md2 on /misc type ext3 (rw,relatime,errors=continue,data=writeback)
/dev/md4 on /DataVolume type ext4 (rw,noatime,nodiratime,barrier=0,data=ordered, usrquota,grpquota)
/dev/md4 on /shares/Public type ext4 (rw,noatime,nodiratime,barrier=0,data=order ed,usrquota,grpquota)
/dev/md4 on /shares/Download type ext4 (rw,noatime,nodiratime,barrier=0,data=ord ered,usrquota,grpquota)
/dev/md4 on /shares/Vmware type ext4 (rw,noatime,nodiratime,barrier=0,data=order ed,usrquota,grpquota)
/dev/md4 on /shares/Backup type ext4 (rw,noatime,nodiratime,barrier=0,data=order ed,usrquota,grpquota)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)
/dev/md4 on /shares/LXC type ext4 (rw,noatime,nodiratime,barrier=0,data=ordered, usrquota,grpquota)

it should read
“unc= four forward slashes then192.168.0.30”