Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents
Up to --> Linux Tutorial

· Linux and Windows
· Easing the Transition to Linux
· Multi-Booting
· Sharing Files

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Recommend Us
Surveys

Features
HOWTOs
News
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 247 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  
Linux Tutorial - Linux and Windows - Sharing Files
  The Right Tools ---- Connecting Linux and Windows  


Sharing Files

Being able to switch back and forth between Linux and Windows or having a GUI that looks similar to Windows is still not enough. As I mentioned, if your data is on an NTFS partition on the local machine, you are pretty much stuck with just reading the data. However, if you data is sitting on a NT server you can access it with no problem.

One of Linux's strengths is Samba, which provides file and print services using the Session Message Block (SMB) protocol (also called the Common Internet Filesystem -CIFS), which is the same protocol Windows machines use. With Samba, Linux machines can provide the file and print services to any machine that supports SMB, including other Linux machines. In fact, at work we use SMB exclusively to access all of file resources, rather than having to configure NFS as well. That means that no matter what operating system someone is working on, they still have access to the same resources (without any extra administrative effort).

So, if Linux machines can access resources on other Linux machines using SMB, why can't they access resources on a Windows machine? The answer is: they can.

Samba actually provides two mechanisms to access resources. The first is smbclient, which provides a functionality similar to ftp. That is, you can copy files back and forth, but do not have the level of interactivity that you do when you mount the filesystem.

To solve this problem, Samba also provides smbmount. As it's name implies smbmount is used to mount filesystems being shared using SMB, and has a syntax similar to the tradition Linux mount command:

smbmount //server/service /mountpoint

Note that the smbmount command is actually a front end to the smbmnt program. Like NFS, smbmount has a number of different options which control not only how the filesystems are mounted, as well as how the client presents itself to the server. For example, you can define the name of your computer, the username used to connect, and so forth. You can also use the -c option to smbmount to pass options directly to the smbmnt command, such as defining which UID and GID to assign to the files on the mounted filesystem.

Let's look at an example. Assume that you have a share called Data sitting on the server jupiter. There is a user on that machine named jimmo, who has been given access to the share. To connect we might issue a command like this:

smbmount //jupiter/Data /mnt/Data -U jimmo

You are then prompted to input the appropriate password. By using the -N option, you can tell smbmount not to prompt for a password.

One thing to note is that the smbmount command varies between the various distributions. For example, on SuSE Linux 6.2 the above syntax mounts the share as a normal filesystem. However, the same syntax on Red Hat 6.0 behaves like the old smbclient.

Fortunately in all likelihood you will be able to use the standard mount command to access SMB filesystems. Although not configured by default, most current distributions include the smbfs filesystem driver, which allows you to treat SMB filesystems basically like any other filesystem. The syntax to mount the share mentioned previously would be:

mount -t smbfs //jupiter/data /mnt/Data

Note that this syntax only works if the share is set up as public, because you typically don't need a password.

We go into detail on configuring SAMBA in another section.

 Previous Page
The Right Tools
  Back to Top
Table of Contents
Next Page 
Connecting Linux and Windows


MoreInfo

Test Your Knowledge

User Comments:


You can only add comments if you are logged in.

Copyright 1997-2004 by James Mohr. Licensed under modified GNU Free Documentation License. See here for details. All rights reserved.
  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can get all the latest Site and Linux news by checking out our news page.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.03 Seconds