[CLUE-Tech] Networking with Samba

Dave Price dp_kinaole at yahoo.com
Thu Apr 15 14:06:07 MDT 2004


On Thu, Apr 15, 2004 at 12:50:55AM -0600, vbsouthern wrote:
> 
> I have read through the Samba documentation and even though I can tell 
> it is written in english it might as well be written in greek. I just 
> can't seem to get what they are talking about.
> 
> I want to connect my system Mandrake/Linux to her Windows ME OS. Can 
> anyone point me to a web site or other resource with instructions that 
> are written for dummies like me?
> 

The 'Samba for Dummies' book is fine, you can get it at amazon.com.

Also, Denver Public Library has:

"Using Samba" by  Robert Ecksein available as an ebook or hard copy

http://www.netLibrary.com/urlapi.asp?action=summary&v=1&bookid=24588

http://textcat.denver.lib.co.us/cgi-bin/cw_cgi?fullRecord+12599+10+623675891+3+3

Either of these are easy to follow.

If you have samba installed, it is very easy to tweak by editing (as
root) /etc/samba/smb.conf

As you make changes to this (well commented and easy to follow) file,
just restart the samba service (not the whole box) to see the changes.

On debian, this is done with "sudo /etc/init.d/samba restart"

Or you can just "kill -HUP" the nmbd and smbd daemons.

The only things you really need to change in the default smb.conf file
are the workgroup name (make it match what your windows boxes are
using) and adding whatever other 'shares' you want to make available to
windows boxes.  

For new shares, see the sample at the end of the file, or here:

[mp3]
   comment = Dave's MP3 files
   writable = no
   browseable = yes
   locking = no
   path = /mp3
   public = yes
;

[bay]
   comment = More MP3 files
   writable = no
   browseable = yes
   locking = no
   path = /bay
   public = yes
;

The [bracket] bit is the name that shows up in the 'Network
Neighborhood' ... Settings are pretty obvious ... the ; at the end of
each section is just a blank comment line.

The only other thing you need to know about is setting up samba users
with smbpasswd ... The big trick here is that 'smbpasswd -a' adds a new
samba user to your system ... 'info smbpasswd' tells you all about this,
including the fact that the user has to already exist in your system's
/etc/passwd file.

In your case your wife will want a userid on your box and permissions to
write to wherever she needs to save files.  Samba can share her home
directory for her by changing that setting in smb.conf: 
(note that I have changed my setting from the defaults)

[homes]
   comment = Home Directories
   browseable = yes
; By default, the home directories are exported read only. Change next
; parameter to "no" if you want to be able to write to them.
read only = no

; File creation mask is set to 0700 for security reasons. If you want to
;       create files with group=rw permissions, set next parameter to 0775.
create mask = 0775

; Directory creation mask is set to 0700 for security reasons. If you want to 
;       create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0775
;
;

You might also want to consider 'mounting' your wife's hard drive and
backing it up for her from the linux box (no giggles please kids).

To do this, share whatever folders you need to backup (or the whole
drive) by right-clicking on the folder in the 'explorer' (My Computer).

Then use smbmount (part of the samba suite) as follows:

smbmount //computer_name/share_name mountpoint

for example,

smbmount "//robbie/audio" ~/audio

... mount the shared folder "audio" on a computer named "robbie" to a
folder in my home directory called audio.  Note that I can mount the
remote folder this way (off my home directory) even if I am not root.

Once mounted, you can backup files however you want - I use 'infozip'
http://www.info-zip.org/pub/infozip/

This a good tool to use because the archives it makes can be read 
with winzip.

Hope this helps.

aloha,
dave




More information about the clue-tech mailing list