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

Temporary Insanity - 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
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 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: