windows-linux interconnection campus-booster id : **xxxxx copyright © supinfo. all rights reserved...

36
Windows-Linux Interconnection Campus-Booster ID : **XXXXX www.supinfo.com Copyright © SUPINFO. All rights reserved Samba

Upload: osborn-marshall

Post on 14-Jan-2016

221 views

Category:

Documents


0 download

TRANSCRIPT

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

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

www.supinfo.com

Copyright © SUPINFO. All rights reserved

Samba

Page 2: Windows-Linux Interconnection Campus-Booster ID : **XXXXX  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: [email protected]

Presenter’s Name

Samba

Page 3: Windows-Linux Interconnection Campus-Booster ID : **XXXXX  Copyright © SUPINFO. All rights reserved 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

Page 4: Windows-Linux Interconnection Campus-Booster ID : **XXXXX  Copyright © SUPINFO. All rights reserved 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

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

Presentation of Samba

From Netbios to now…

Samba

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

Quotation

“More we share, more we have.”

— Leonard Nimoy,American actor

Presentation of Samba

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

Preview

NetBios protocol.

SMB protocol.

Presentation of Samba 3.

These are the chapters that we will approach :

Presentation of Samba

Page 8: Windows-Linux Interconnection Campus-Booster ID : **XXXXX  Copyright © SUPINFO. All rights reserved 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:

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

SMB ProtocolPresentation of Samba

ServerMessageBlock

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

SMB ProtocolHere are some features of SMB :

Presentation of Samba

Created by IBM and Microsoft.

Based on NetBIOS.

2 mode of authentication :

share

user

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

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)

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

Stop-and-Think

Do you have any questions ?

Presentation of Samba

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

Configuration of Samba

Client and Server

Samba

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

Preview

Client configuration.

Server configuration.

SWAT.

These are the chapters that we will approach :

Configuration of Samba

Page 15: Windows-Linux Interconnection Campus-Booster ID : **XXXXX  Copyright © SUPINFO. All rights reserved 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.

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

Server configuration

smbd

Manages files and printers sharing.

nmbd

Names management service

Samba owns two daemons :

Configuration of Samba

Page 17: Windows-Linux Interconnection Campus-Booster ID : **XXXXX  Copyright © SUPINFO. All rights reserved 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

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

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

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

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

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

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.

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

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

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

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.

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

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

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

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

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

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

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

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.

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

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

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

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)

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

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

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

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

}

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

SWATThe Samba Web Administration Tool:

Configuration of Samba

Need help?:

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

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

Stop-and-Think

Do you have any questions ?

Configuration of Samba

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

Presentation of Samba(protocol,

samba)

Course Summary

Configuration of Samba

(client, server)

Samba

Samba Web Administration

Tool

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

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

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

Congratulations

You have successfully completed the SUPINFO course module n°10

Samba

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

The EndSamba