LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Mount with FSTAb error (https://www.linuxquestions.org/questions/linux-newbie-8/mount-with-fstab-error-4175442895/)

miros84 12-25-2012 08:46 AM

Mount with FSTAb error
 
I tried to mount a NAS to my FSTAB and when I type
Code:

mount -a
it tells me Line 12 has un error. And line 12 is the line I just added

Code:

//mirosred2/volume_1/COPSEG        /mnt/COPSEG        cifs        user=admin        password=djfuri5675 user,auto,rw    0    0
Is there something wrong with this line?

I just installed samba and cifs from synaptic.

camorri 12-25-2012 09:11 AM

At a minimum you have syntax errors. After the 'cifs' ( fstype ) starting at user= should be a comma separated list. You have user twice, should only be once.

Other problems, not sure.

Here is a link to a how to, with several examples.

-->http://opensuse.swerdna.org/susesambacifs.html

Hope this helps.

gdejonge 12-25-2012 09:45 AM

The user and password are part of the mount-options, which is a comma separated list. You're missing some comma's.

A few notes aside.
Next time also show us the error message that you got. It makes it easier to diagnose the problem.
I hope you didn't show us the real username and password for the nas box. That seems to be a very bad habit, I've been told.
Normally you would only name the host-machine and the share name as the mount source. Like this
Code:

//sirius/samba  /data/samba  cifs  cred=/etc/cred.gdj  0  0
As you see I use a credentials file to store the user/password information and which is only accessible by root.

michaelk 12-25-2012 11:42 AM

In addition to the previous comments
Quote:

user=admin
Should be
Quote:

username=admin

miros84 12-25-2012 11:46 AM

Well, I changed password and username.
Problem is the comma separatted list as you told me. I fix it and it works.
Thank you very much.

What credential file? Give me an example of that file please.

---------- Post added 12-25-12 at 12:46 PM ----------

Well, I changed password and username.
Problem is the comma separatted list as you told me. I fix it and it works.
Thank you very much.

What credential file? Give me an example of that file please.

gdejonge 12-25-2012 03:53 PM

It's just text file with the following information:
Code:

username=name
password=password
domain=domain

You can also look at
Code:

man mount.cifs
For the specific mount options for cifs.


All times are GMT -5. The time now is 06:25 PM.