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

 
Developer Updates  
Free Website Content 
IBM Rational Software Development Conference
 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? 
ADMINISTRATION

Dancing The Samba (part 1)
By: icarus, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 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:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb 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

    Route your faxes to your email inbox. Private, secure fax numbers available from CallWave. Choose your fax number.

    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

    - 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
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway