Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-17-2009, 01:46 PM   #1
Registered: Nov 2003
Posts: 809

Rep: Reputation: 39
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:

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:

/<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:

mount error 6 = No such device or address
Refer to the mount.cifs(8) manual page ( mount.cifs)
What is the correct syntax for the fstab file? Thanks.
Old 08-17-2009, 03:51 PM   #2
LQ Newbie
Registered: Jul 2009
Location: NL
Posts: 8

Rep: Reputation: 0
Sure you need 'cifs' and not 'smbfs'?
Old 08-17-2009, 04:47 PM   #3
Registered: Nov 2003
Posts: 809

Original Poster
Rep: Reputation: 39
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:

/<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:

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.
Old 08-17-2009, 05:48 PM   #4
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
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.


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

The first part of the fstab line needs to look like
//<server name>/<samba share name>

Last edited by catkin; 08-17-2009 at 06:06 PM. Reason: Foolishness


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the correct syntax to start Windows install from DOS? randell6564 General 4 04-27-2010 07:37 AM
The correct syntax to mount a Windows hard drive in Ubuntu mariuslestat Linux - Newbie 1 06-30-2008 07:44 PM
Correct syntax for adding text to an existing file kaplan71 Linux - Software 4 01-05-2008 07:36 PM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 12:22 PM
correct syntax for a canonical file? rioguia Linux - Software 1 11-04-2003 03:11 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration