Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am a Ubuntu 12.04 novice and am seriously struggling to mount my network drive. I can see it in Nautilus, and its properties detail its name as 'Seagate Expansi'. I have installed cifs, created the folder /media/public and added the line:

//192.168.1.1/Seagate Expansi /media/public cifs guest 0 0  

...to etc/fstab. however when I run:

sudo mount -a 

I receive the error:

line 3 in /etc/fstab is bad

I kind of understand what the error is telling me, but I don't understand where I have gone wrong. Does anyone have any advice?

share|improve this question
    
I think your problem is the space character between "Seagate" and "Expansi". Try using something without spaces in it - or try to enclose it in quotes. –  hmayag Oct 14 '13 at 19:49
    
Thank you for your response, unfortunately it didnt work. I tried quotes - "seagate expansi", I tried seagate_expansi, seagateexpansi. In these cases I recieved "mount error(6): No such device or address" –  Rich_C Oct 14 '13 at 20:22
    
# UNCONFIGURED FSTAB FOR BASE SYSTEM /host/ubuntu/disks/swap.disk none swap sw 0 0 //192.168.1.1/seagate expansi /media/public cifs guest 0 0 –  Rich_C Oct 14 '13 at 20:24
    
Oooops my bad. It seems that quotes don't work in fstab. Try replacing the space with escape character notation.Space is \040 –  hmayag Oct 14 '13 at 20:42
    
WooHooo !! Yep that sorted it instantly - thank you very much :) I never would have found that on my own. –  Rich_C Oct 14 '13 at 20:52
add comment

1 Answer

The problem is that there is a space character in the URL.

Since fstab does not allow use of quotes, you have to use the escape character notation. Use \040 to replace the space between "Seagate" and "expansi"

share|improve this answer
add comment

Your Answer

 
discard

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.