Administration
  Home arrow Administration arrow Page 4 - Dancing The Samba (part 1)
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
ADMINISTRATION

Dancing The Samba (part 1)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 12
    2002-10-02


    Table of Contents:
  • Dancing The Samba (part 1)
  • Speaking In Tongues
  • Building Blocks
  • Temporary Insanity
  • Meet Joe Nobody
  • Home Sweet Home
  • Access Denied
  • Mounting Up

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Dancing The Samba (part 1) - Temporary Insanity
    ( Page 4 of 8 )

    We'll start with something very basic - setting up a temporary file area on your Linux server, to be shared by all connecting Windows clients.

    Samba configuration is handled via a single file, named "smb.conf", which is stored by default in Samba's "lib" directory. This file is not installed during the installation process; you need to manually copy it from the source archive (usually from the "examples" directory) into your Samba directory tree and modify it as per your requirements. I'm not going to be doing that in this article, preferring instead to create it from scratch for illustrative purposes; however, you should peek into the default file when you have a minute and study the well-commented examples in it to better understand the kinds of configuration options possible.

    Create a file named "smb.conf" in Samba's "lib" directory,
    $ vi /usr/local/samba/lib/smb.conf
    and add the following directives to it:
    [global]
            workgroup = medusa
            server string = "Primary file server, 40GB"
    
    [temp]
            comment = Temporary file area
            path = /tmp
            read only = no
            guest ok = yes
    As you can see, this configuration file is similar to a standard Windows INI file, in that it is broken up into different sections, each containing variable-value pairs. Sections are identified by square braces around the section name, and lines beginning with semi-colons (;) or hashes (#) are treated as comments and ignored.

    The first section of the file sets up global variables for Samba to use - in this case, it identifies the server as belonging to a workgroup named "medusa", and gives it a descriptive label. This information will be used by Windows clients when building the Windows Network Neighborhood.

    The second section sets up a "share" on the server - this is simply a directory that is available to all connecting clients. In this case, I've selected the "/tmp" directory, give it the share name "temp" and set it to be writeable by all users.

    Once you've saved your changes to the "smb.conf" file, it's a good idea to verify that it doesn't contain any errors by using Samba's very handy "testparm" tool.
    $ /usr/local/samba/bin/testparm 
    Load smb config files from /usr/local/samba/lib/smb.conf Processing
    section "[temp]" Loaded services file OK. Press enter to see a dump of
    your service definitions
    No errors? Time to start up Samba's "smbd" and "nmbd" daemons, and make the "temp" share available to connecting clients.
    $ /usr/local/samba/bin/smbd -D
    $ /usr/local/samba/bin/nmbd -D
    If Samba starts up OK, you need to first verify that the configured shares are active. You can do this by using the built-in SMB client that ships with Samba - it's called "smbclient", and it's a very handy tool for debugging problems.
    $ /usr/local/samba/bin/smbclient //olympus/temp
    added interface ip=192.168.3.1 bcast=192.168.3.255 nmask=255.255.255.0
    added interface ip=192.168.0.77 bcast=192.168.0.255 nmask=255.255.255.0
    Password: 
    Anonymous login successful
    Domain=[MEDUSA] OS=[Unix] Server=[Samba 2.2.5]
    smb: \>
    If you can access SMB shares on the server itself, the next step is to check if you can access them from other Windows clients. Fire up one of your Windows clients, log into it and see if you can find your server, either in the Network Neighborhood or via the Find Computer dialog box.

    Once you find the server, you should be able to see and use the shared directory on the server.



    You can also mount the share as a Windows-accessible drive via a unique drive letter, using the "net" command. Open up an MS-DOS window and try this:
    c:\> net use t: \\olympus\temp
    You should now see the "temp" share on the server as drive letter T: in Windows Explorer.



     
     
    >>> More Administration Articles          >>> More By icarus, (c) Melonfire
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek