Home arrow Site Administration arrow Page 6 - Dancing The Samba (part 1)

Home Sweet Home - Administration

Tired of paying hundreds of dollars for commercial file serversoftware? Looking for an application that lets you share *NIX andWindows files seamlessly across a network? Say hello to Samba, softwarethat's so cool, it'll make you want to kick up your heels and dance,dance, dance!

TABLE OF CONTENTS:
  1. Dancing The Samba (part 1)
  2. Speaking In Tongues
  3. Building Blocks
  4. Temporary Insanity
  5. Meet Joe Nobody
  6. Home Sweet Home
  7. Access Denied
  8. Mounting Up
By: icarus, (c) Melonfire
Rating: starstarstarstarstar / 12
October 02, 2002

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement
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 Site Administration Articles          >>> More By icarus, (c) Melonfire
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: