LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-15-2009, 02:38 PM   #1
AustinMarton
Member
 
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?

Thanks,
Austin.

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

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

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

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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 07:22 PM.
 
  


Reply

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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration