Administration
  Home arrow Administration arrow Page 6 - 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) - Home Sweet Home
    ( Page 6 of 8 )

    So that takes care of setting up a publicly-accessible share on the file server. Another very common task involves making each user's home directory on the server accessible to them on their Windows workstations, via Windows Explorer. This makes it possible to read and write files to home directories on the server using standard Windows file manipulation commands.

    In order to make this simpler, Samba comes with a special "homes" section in its configuration file, designed specifically for this situation. Pop open your "smb.conf" and add the following lines to it:
    [homes]
            comment = Home area
            writeable = yes
            browseable = no
            valid users = %S
    Save your changes and restart the smbd and nmbd daemons.
    $ killall smbd
    $ killall nmbd
    $ /usr/local/samba/bin/smbd -D
    $ /usr/local/samba/bin/nmbd -D
    This time, when you try connecting to the server via a Windows client, you should see your home directory in the list of shares, and you should be able to add and delete files from it.



    How does this work? It's pretty elegant, actually - whenever an SMB client connects to the server with a share name, the configuration file is scanned for matches. If a match is found and all authentication tokens are satisfied, the share becomes available to the client. If, however, no match is found, but the requested share also matches a user on the system, the user's home directory is shared dynamically and made available to the requesting client.

    In case you're wondering, the
    browseable = no
    parameter tells Samba not to display this share in the list of browseable shares, while the
    writeable = yes
    parameter makes the share writeable by the connecting client. Access is restricted via the
    valid users = %S
    parameter, which ensures that each user can only see his or her own home directory (%S is a special variable used by Samba; it is automatically replaced with the name of the service being accessed).

    This special "homes" makes it possible for system administrators to quickly and efficiently give users access to their private home areas, with minimal configuration needed.

    Just as you did with the previous example, you can also mount this share as a Windows-accessible drive via a unique drive letter.
    c:\> net use h: \\olympus\home
    You should now see your home directory on the server as drive letter H: 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