Ubuntu – Ubuntu mount cifs from terminal, error: mount: can’t find /home/socio/spc in /etc/fstab

16.04cifsmountsamba

I try to mount a smb share in ubuntu from command line.
This is one-time mount, I do not want to alter fstab or reboot the machine.

The command used is taken from this answer:

udo mount -t cifs //<server>/<share> -o username=user@domain,unc=\\\\<server>\\<share> /home/<user>/spc

It prints an error instead:

can't find /home/<user>/spc in /etc/fstab

What is that supposed to mean?
And how do I get it to work?

Best Answer

Instead of sudo mount -t cifs //<server>/<share> -o username=user@domain,unc=\\\\<server>\\<share> /home/<user>/spc

try

sudo -S mount -t cifs //<server>/<share> /home/<user>/spc -o username=user@domain,unc=\\\\<server>\\<share>

I don't know the unc option though. I use for options username, password, iocharset, sec, file_mode, and dir_mode.

Related Question