Windows-Linux Interconnection Campus-Booster ID : **XXXXX Copyright © SUPINFO. All rights reserved...

Post on 14-Jan-2016

222 views 0 download

Tags:

Transcript of Windows-Linux Interconnection Campus-Booster ID : **XXXXX Copyright © SUPINFO. All rights reserved...

Windows-Linux Interconnection Campus-Booster ID : **XXXXX

www.supinfo.com

Copyright © SUPINFO. All rights reserved

Samba

Your trainer…

Title: **Enter title or job role.

Accomplishments: **What makes the presenter qualified to present this course.

Education: **List degrees if important.

Publications: **Writings by the presenter on the subject of the course or presentation.

Contact:**Campus-Booster ID: presenter@supinfo.com

Presenter’s Name

Samba

Course objectives

Understand how to share data by defining and reminding history of Samba.

Install and configure Samba.

By completing this course, you will :

Samba

Course topicsThese are the parts we will approach :

Samba

Presentation of Samba

The different protocols

Presentation of Samba

Configuration of Samba

Client side

Server side

SWAT

Presentation of Samba

From Netbios to now…

Samba

Quotation

“More we share, more we have.”

— Leonard Nimoy,American actor

Presentation of Samba

Preview

NetBios protocol.

SMB protocol.

Presentation of Samba 3.

These are the chapters that we will approach :

Presentation of Samba

NetBIOS ProtocolPresentation of Samba

Created by IBM in 1984

Based on the host name

Rudimentary

NBT = NetBIOS on TCP/IP

Here are some features of NetBIOS:

SMB ProtocolPresentation of Samba

ServerMessageBlock

SMB ProtocolHere are some features of SMB :

Presentation of Samba

Created by IBM and Microsoft.

Based on NetBIOS.

2 mode of authentication :

share

user

Presentation of Samba 3Here are some features of Samba 3 :

Presentation of Samba

Created by Andrew Tridgell, in 1991

Allows to share :

files

printers

Can act as a :

Domain controller

WINS server (Windows Internet Name Service)

Stop-and-Think

Do you have any questions ?

Presentation of Samba

Configuration of Samba

Client and Server

Samba

Preview

Client configuration.

Server configuration.

SWAT.

These are the chapters that we will approach :

Configuration of Samba

Client configurationThe client tools:

Configuration of Samba

smbclient

Client command which allows to connect to a server.

Navigation as ftp

smbmount

Mounts the remote shares on the local files system

nmblookup

Gets an IP address from a NetBIOS name.

Server configuration

smbd

Manages files and printers sharing.

nmbd

Names management service

Samba owns two daemons :

Configuration of Samba

Server configurationConfiguration of Samba

Only one configuration file for the server.

Sections

[global]: general configuration options of the server

[homes]: options concerning the sharing of the personal directories.

[netlogon]: options concerning the management of netlogon (scripts).

[printer]:options concerning the sharing of printers

[share]: here, “share” indicates a specific shared folder.

[section_name]Parameter = valueParameter2 = value2

Server configurationConfiguration of Samba

Variable substitutions

Allow to specify a variable instead of a name for a directive. These are some :

%U : The session username.

%G : The Primary group of %U

%h : The Server’s hostname

%I : The IP address of the client

%T : The current date and time

%s : The connected user

Server configurationConfiguration of Samba

[global] section Allows to configure environment parameters for the

server. Some basis parameters:

Workgroup netbios name Invalid users Hosts deny/allow guest account

Allows to activate the WINS server: name resolve order = wins host lmhosts bcast wins support = yes

Server configurationConfiguration of Samba

[global] section

Security options allow to specify how the security is managed:

user: Authentication on the server in order to list the shares and to have access on them.

share: Authentication is done on each shared folder. The listing is made without logging.

server or domain: Allows an authentication on another domain or server.

Server configurationConfiguration of Samba

[global] section

[global]time server = yesworkgroup = LINUX netbios name= LABO server string = %h server (Samba, Mandriva) passdb backend = tdbsam obey pam restrictions = yesguest account = nobody invalid users = root

Server configurationConfiguration of Samba

[share] section:

Each shared folder needs his section.

Share sections parameters:

comment: shared folder description.

path: path to the local folder.

valid users: list of authorized users

- user1, user2 : access for user1 and user2 only.

- @users: access for the group “users” only.

browseable: possibility to explore the shared folder

read only: access in read only mode.

Server configurationConfiguration of Samba

[share] section

[Share]path = /home/shared_foldercomment = My shared foldervalid users = gecko, @supinfo, mandriva, bobwrite list = @supinfo, mandrivaRead list = gecko, bobpublic = no

Server configurationParticular Sections:

Configuration of Samba

[homes] Section

Share each user’s home directory as //server/username.

valid users = %s : Access only for the user at his own home folder.

[netlogon] Section

Allows to configure the netlogon shared folder (scripts *.bat..)

Useful to configure the server as a DC.

Path: /var/lib/samba/netlogon

Server configurationConfiguration of Samba

[homes]comment = Home Directoriesbrowseable = yesvalid users = %Swritable = yescreate mask = 0600directory mask = 0700

[netlogon]comment = Network Logon Servicepath = /home/samba/netlogonguest ok = yeswritable = noshare modes = no

Server configurationParticular Sections:

Configuration of Samba

[printers] Section

Allows the sharing for the printers.

printable directive : activates the shared folder.

Path: /var/spool/samba (path to the printing queue)

[print$] Section

Shared folder containing printing drivers.

Path: /var/lib/samba/printer, path to the drivers.

Server configurationConfiguration of Samba

[printers]comment = All Printersbrowseable = nopath = /var/spool/sambaprintable = yesguest ok = nowritable = yescreate mode = 0700

[print$]comment = Printer Driverspath = /var/lib/samba/printersbrowseable = yesread only = yesguest ok = no

Server configurationsmbpasswd command :

Configuration of Samba

Allows to activate/add a samba user.

Users used by some directives like valid users.

Options:

-a : add (add a samba user)

-e: enable (enable a samba user)

Server configurationtestparm command :

Configuration of Samba

Checks if your configuration is smb.conf file is correct

[supinfo@localhost ~]$ testparm Load smb config files from /etc/samba/smb.confProcessing section "[homes]"Processing section "[printers]"Processing section "[print$]"Processing section "[share]"Loaded services file OK.Server role: ROLE_STANDALONEPress enter to see a dump of your service definitions

SWATThe Samba Web Administration Tool:

Configuration of Samba

The package in Mandriva:

In /etc/xinetd.d/swat :

# urpmi samba-swat

service swat{

port = 901socket_type = streamwait = noonly_from = localhostuser = rootserver = /usr/sbin/swatlog_on_failure += USERIDdisable = no

}

SWATThe Samba Web Administration Tool:

Configuration of Samba

Need help?:

http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/SWAT.html

Stop-and-Think

Do you have any questions ?

Configuration of Samba

Presentation of Samba(protocol,

samba)

Course Summary

Configuration of Samba

(client, server)

Samba

Samba Web Administration

Tool

For more…

CoursesPublications

Web sites

www.labo-mandriva.com

Linux MCA

If you want to go into these subjects more deeply…:

www.labo-linux.org

www.dunod.com

Samba

Congratulations

You have successfully completed the SUPINFO course module n°10

Samba

The EndSamba