LinuxQuestions.org
Review your favorite Linux distribution.
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-10-2008, 04:42 PM   #1
michaelmalak
LQ Newbie
 
Registered: Nov 2008
Posts: 2

Rep: Reputation: 0
Accessing Windows shared drive from command line


Using the Fedora 8 desktop GUI (running under VMWare on Windows XP), I can connect to my Buffalo TeraServer Network Attached Storage by simply specifying 192.168.0.9/share as the server name. The network is a Windows Workgroup (no domain controller).

How can I do the same thing from the Linux command line?

I'm assuming I need to do something with Samba? (Is that what the Fedora 8 desktop doing behind the scenes?) I have tried the following:

smbmount //192.168.0.9/share
smbmount: command not found

mount -t smbfs //192.168.0.9/share ts
unknown filesystem type 'smbfs'
 
Old 11-10-2008, 05:08 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,354

Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
Quote:
Originally Posted by michaelmalak View Post
Using the Fedora 8 desktop GUI (running under VMWare on Windows XP), I can connect to my Buffalo TeraServer Network Attached Storage by simply specifying 192.168.0.9/share as the server name. The network is a Windows Workgroup (no domain controller).

How can I do the same thing from the Linux command line?

I'm assuming I need to do something with Samba? (Is that what the Fedora 8 desktop doing behind the scenes?)
You can find out what the GUI is doing by mounting through the GUI and then issuing the mount command with no parameters:

mount

This command will show you what is mounted and how.

-------------------
Steve Stites
 
Old 11-10-2008, 06:34 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
Quote:
Originally Posted by michaelmalak View Post
Using the Fedora 8 desktop GUI (running under VMWare on Windows XP), I can connect to my Buffalo TeraServer Network Attached Storage by simply specifying 192.168.0.9/share as the server name. The network is a Windows Workgroup (no domain controller).

How can I do the same thing from the Linux command line?

I'm assuming I need to do something with Samba? (Is that what the Fedora 8 desktop doing behind the scenes?) I have tried the following:

smbmount //192.168.0.9/share
smbmount: command not found

mount -t smbfs //192.168.0.9/share ts
unknown filesystem type 'smbfs'

Here, the problem most likely that you need to use "cifs" instead of smbfs. Depending on the kernel version, smbfs is either depreciated or even dropped. Cifs has additional support for Unix/Linux filesystems. If the filesystem being shared doesn't support options like ownership and permissions, then the smbfs style options are a fall-back.

Read the mount and mount.cifs manpages for the mount options. Look in particular at the "uid","gid","dmask","fmask", "username" and "password" options.

Look at the "cred" option to point to a credentials file instead of having "username" and "password" in the /etc/fstab file. (Assuming you aren't using a public share).

mount.cifs isn't normally run on its own. Run "mount" with the "-t cifs" filesystem. The mount command will call the "mount.cifs" program.

If you create an entry in /etc/fstab for this share, then you could simply use the mount point in your mount command, and the gory details (IP, password, options) can be left out. The mount command will get them from the fstab file. If you don't want it mounted when you boot up, use the "noauto" option. Otherwise use the "_netdev" option to defer mounting until after the network is up.

Last edited by jschiwal; 11-10-2008 at 06:37 PM.
 
  


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
accessing windows shared files from suse 10 computer Linux - Newbie 3 06-04-2006 12:27 PM
Samba not accessing my Windows Shared folders Felpipe Linux - Networking 3 08-04-2005 08:34 AM
[php] accessing command line dtra Linux - Software 1 04-26-2005 07:19 PM
Accessing windows shared folders in linux srivatsava Linux - Networking 1 09-29-2004 03:01 PM
Accessing Windows shared files from Mandrake j03 Linux - Networking 0 02-07-2004 03:47 PM

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

All times are GMT -5. The time now is 10:50 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