Wednesday, November 17, 2010

Samba - old web page

Samba

How to set up samba on Linux.

Installation

On Xubuntu Dapper Drake, Samba can be installed by typing
apt-get install samba
The software is stored on the CD.


/etc/samba/smb.conf

Supposing you wanted to set up a shared folder called projects . Your smb.conf entry might contain the following fragment

workgroup = CAPCIS # or whatever workgroup you decide on
[projects]
       comment = Projects
       path = /home/shared/projects
       writeable = yes
       valid users = @users
       create mask = 2660
       directory mask = 2770

This will give users access to this directory, and they'll be able to read and write to it.

User accounts

You will probably need to create a samba account for a user:
smbpasswd -a username
You will be prompted for a password

Start/stop/restarting samba

On Xubuntu Dapper Drake, to restart samba you would type, as root:
/etc/init.d/samba restart
Starting and stopping is achieved by replacing the word restart with either start or stop .

Mounting directories

If you want to mount directories on your Linux drive that belong on remoter machines, (to use smbclientsmbmount etc.), you will also need to install package smbfs . A typcial way of doing it might be:

mkdir /mnt/projects
chmod a+w /mnt/projects
smbmount  //192.168.30.3/projects /mnt/projects -o username=NNN,password=NNN,workgroup=NNN,uid=NNN,guid=NNN

You can umount by typing
umount /mnt/aber1

Author:  Mark Carter
Created: 06-Feb-2006
Updated: 06-Sep-2006

No comments: