Wednesday, November 17, 2010

Samba - old web page


How to set up samba on Linux.


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


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
       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  // /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: