LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Correct syntax for mounting a windows share in the /etc/fstab file (https://www.linuxquestions.org/questions/linux-software-2/correct-syntax-for-mounting-a-windows-share-in-the-etc-fstab-file-748197/)

kaplan71 08-17-2009 12:46 PM

Correct syntax for mounting a windows share in the /etc/fstab file
 
Hi there --

I am trying to mount a Windows share using the /etc/fstab file. The Windows share can be mounted manually using the following command syntax:

Code:

mount -t cifs //<windows server>/Photon-CMS -o username=<username>,password=<password> /FOCUS/tmp/network/import
The command syntax that I used in the /etc/fstab file to automate the process shown above is the following:

/
Code:

/<windows server>/Photon-CMS$ /FOCUS/tmp/network/import cifs user=<username>,password=<password> 0 0
However, when I ran the mount -a command, I got the following error:

Quote:

mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
What is the correct syntax for the fstab file? Thanks.

DebianDwarf 08-17-2009 02:51 PM

Sure you need 'cifs' and not 'smbfs'?

http://www.linuxquestions.org/questi...-shares-29340/

kaplan71 08-17-2009 03:47 PM

Hi there --

Thanks for your reply. I tried the smbfs instead of the cifs option in the fstab line. The new syntax read as follows:

Code:

/<windows server>/Photon-CMS$ /FOCUS/tmp/network/import smbfs user=<username>,password=<password> 0 0
When I ran the mount -a command again, the output that I got was the following:

Quote:

Unknown parameter encountered: "client code page"
Ignoring unknown parameter "client code page"
6309: session setup failed: ERRDOS - ERRnoaccess (Access denied.)
SMB connection failed
The user account is a domain user account. I vaguely remember an option that addresses this issue, but I don't remember the syntax.

catkin 08-17-2009 04:48 PM

The problem may be caused by the networking not being fully initialised before the init script that mounts the file system listed in fstab is run. One solution is to remove the CIFS from fstab and mount it later in rc.local; there are other workarounds but they are either more complicated or slow down booting.

Edit:

Sorry -- I missed your later post about mount -a.

The first part of the fstab line needs to look like
Code:

//<server name>/<samba share name>


All times are GMT -5. The time now is 05:47 AM.