Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I tried to mount a samba share from the local network to a folder in my PC. I added the following line in fstab

sudo mount -t cifs // /home/mounts/localmount/

But when I do sudo mount -a, it gives the following error:-

[mntent]: line 13 in /etc/fstab is bad

Can anyone tell me what I did wrong? I'm on Ubuntu 12.10, so sudo smbmount //hostname/sharename ~/mounts/sharename -o user=username wont work [source]

share|improve this question
up vote 3 down vote accepted

The entry in fstab is not a command; don't include the sudo mount portion.

Instead, make the line look something like

// /home/mounts/localmount cifs rw

A similar thread over at UbuntuForums has more good information about further options, if you need login credentials, special encoding, or other permissions settings.

share|improve this answer
Thanks :) I added the following line and it worked // /home/mounts/localmount cifs user=admin,password=123,rw,iocharset=utf8,uid=1000,gid=1000 0 0 – Sparky Jan 25 '13 at 9:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.