LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-17-2009, 12:46 PM   #1
kaplan71
Member
 
Registered: Nov 2003
Posts: 718

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:

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.
 
Old 08-17-2009, 02:51 PM   #2
DebianDwarf
LQ Newbie
 
Registered: Jul 2009
Location: NL
Posts: 8

Rep: Reputation: 0
Sure you need 'cifs' and not 'smbfs'?

http://www.linuxquestions.org/questi...-shares-29340/
 
Old 08-17-2009, 03:47 PM   #3
kaplan71
Member
 
Registered: Nov 2003
Posts: 718

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:

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.
 
Old 08-17-2009, 04:48 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,533
Blog Entries: 28

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

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


Reply


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 06:37 AM
The correct syntax to mount a Windows hard drive in Ubuntu mariuslestat Linux - Newbie 1 06-30-2008 06:44 PM
Correct syntax for adding text to an existing file kaplan71 Linux - Software 4 01-05-2008 06:36 PM
Mounting windows share via cifs (fstab entry) - error 13 opening credentials file O(V)eGA_l2el) Linux - Networking 2 12-05-2006 11:22 AM
correct syntax for a canonical file? rioguia Linux - Software 1 11-04-2003 02:11 AM


All times are GMT -5. The time now is 10:43 AM.

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