Home > Documentation > SAMBA > Installing Samba

Installing Samba

Posted by peter on October 25, 2011

Downloads can take the form of “tarballs” or “rpms”. You probably have your preferred method of installing Linux packages.

You can download the latest stable version of SAMBA from http://samba.org.

 As an example, if you download the latest tarball, you will need to “unzip” the file using the the “tar” command as follows:

tar –vzxf samba-3.0.23d.tar.gz

 Once you have extracted this file, browse to the directory created and do what you would normally do when installing an app from a tarball. In this case, browse to the source directory type “./configure”, then “make” and finally “ make install”.

 Once the installation is complete you will need to start the SAMBA services

/etc/init.d /smb start

/etc/init.d /nmb start

Some Linux distributions will start both services with one command “/etc/init.d/smb start

Overview

The main configuration file you will be accessing will be the /etc/samba/smb.conf file. Below is an example of a simple “Stand alone” SAMBA server, have a look at the basic structure. The lines that start with “#” are not read by SAMBA and are there for the benefit of any human who is reading the file. The different sections are often called stanzas .

 -----------------Example------------------------------------------

# Samba config file

# from 127.0.0.1 (127.0.0.1)

# Date: 2007/01/10 09:29:09

#the [global] section defines global settings an parameters that apply to the whole Samba

#server

 

[global]

workgroup = TUX-NET

map to guest = Bad User

printcap name = cups

logon path = \\%L\profiles\.msprofile

logon drive = P:

logon home = \\%L\%U\.9xprofile

cups options = raw

include = /etc/samba/dhcp.conf

 

#the [homes] section defines the shared home directory of each users, each users shared home

#directory is only visible to that user. The share is not visible to other users on the network.

 

[homes]

comment = Home Directories

valid users = %S, %D%w%S

read only = No

inherit acls = Yes

browseable = No

 

#the [print$] share is a meta-service that establishes print queue support and that specifies the

# location of the intermediate spool directory into which print jobs are received from Windows

#clients prior to being dispatched to the UNIX/Linux print spooler. The printers meta-

#service will cause every printer that is either specified in a printcap file, via the lpstat, or

#via the CUPS API, to be published as a shared print queue.

 

[print$]

comment = Printer Drivers

path = /var/lib/samba/drivers

write list = @ntadmin, root

force group = ntadmin

create mask = 0664

directory mask = 0775

#the [data] section is an example of a created share to which the user peter, fred and john have

#have “full controll” access

 

[data]

comment = Data folder

path = /data

valid users = peter, fred, john

read only = No


------------------Example end------------------------------

Comments:

Leave a Reply



(Your email will not be publicly displayed.)

Please type the letters and numbers shown in the image.Captcha CodeClick the image to see another captcha.