Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 11-15-2009, 03:38 PM   #1
Registered: May 2007
Location: New Zealand
Distribution: Ubuntu
Posts: 88

Rep: Reputation: 16
Mounting a smb share as a local folder on Fedora 9 accessing a Windows Server

I have managed to connect to the Windows server in the office and the shared folders I want are now available through the 'Places' menu. I can access the files through nautilus.

We want to use this setup for remote FPGA development so another computer can compile the system image and I download the image via JTAG on my fedora box. The problem I am having is the command line utility to download the image does not like the remote location 'smb://cmpyname/development/'. Is it possible for me to mount the samba share as a folder in the /mnt directory so it can be accessed as if it was local? Something to do with CIFS?


Last edited by AustinMarton; 11-15-2009 at 11:13 PM.
Old 11-15-2009, 08:01 PM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
The location "smb://cmpyname/development/" is specific to your desktop environment and file manager, it is not a real location on the system and as such software on your system will not be natively aware of it. It's only function is really just to browse remote shares.

To mount it locally you would do the same as any other device or filesystem, use the "mount" command.

A command might look like:

mount -t smbfs //cmpyname/development/ /mnt/development
Old 11-15-2009, 08:21 PM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671Reputation: 671
Yes. You use cifs as the filetype. (smbfs is obsolete and might not be supported in your kernel) You can either mount it manually or add an entry in /etc/fstab. You may still want to mount it manually even using an /etc/fstab entry, in case the share isn't available when you boot.

Here is a general example:
//host/share /mnt/share cifs rw,uid=<yourusername>,gid=<yourgroup>,fmask=0117,dmask=0007,noauto,cred=/home/<yourusername>/.credentials

Create a .credentials file in your home directory and add two or three lines:
username=<your user name>
password=<your password>
domain=<domain name>

The third entry is only necessary if you use Active directory or NT style domains.
You don't want the credentials in the fstab file because it is world readable. So using a credentials file restricts who can read it. Use a full pathname to the file, as the ~ shortcut is understood by the shell and not the mount command.

The noauto option prevents the system from trying to mount it when you boot up. If that host is down, booting will fail with automounting.

There is a man page for "mount.cifs" which will describe other option you may want to use.

Last edited by jschiwal; 11-15-2009 at 08:22 PM.


cifs, fedora, local, mount, samba, server, smb, windows

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
Mounting smb folder with Fedora Core 5? FLX Linux - Networking 23 07-03-2009 07:09 PM
Can't access SMB share from Windows to OpenSuse folder ceantuco Linux - Newbie 2 11-20-2008 07:32 PM
how to accessing windows share folder from Linux Machine imughal Linux - Newbie 1 02-29-2008 02:49 AM
Error Mounting Windows SMB Share plustiber Linux - Networking 1 06-27-2005 01:39 AM
Auto mounting Linux smb share on Windows at startup neranjana Linux - Networking 1 07-02-2004 07:56 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration