SAMBA Server Message Block File & Print Server. Service Profile Type: System-V managed service Packages: samba-common, samba-client Daemons: nmbd, smbd.

Slides:



Advertisements
Similar presentations
Nassau Community College
Advertisements

Homework 5b: Samba. Computer Center, CS, NCTU 2 Network-based File Sharing (1)  NFS (UNIX-based) mountd is responsible for mount request nfsd and nfsiod.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Samba Integrating SMB file systems with UNIX. Samba Provides a file server compatible with Windows 9x and NT.. SMB Can function in NETBIOS name browsing.
Network Shares and Accounts Sharing Printers, Drives, Folders – Setup Windows 95/98 Windows NT (2000, XP) Linux – Users – Groups.
Hussain Ali Department of Computer Engineering KFUPM, Dhahran, Saudi Arabia Microsoft Networking.
Linux+ Guide to Linux Certification, Second Edition
1 Network File System. 2 Network Services A Linux system starts some services at boot time and allow other services to be started up when necessary. These.
FINAL PROJECT SAMBA Server
CMSC 691X – Summer 2002 Project By Pravin D’Souza.
Installing Samba Vicki Insixiengmay Jonathan Krieger.
1 COP 4343 Unix System Administration Unit 16: file server – samba.
UNIT - III. Installing Samba Windows uses Sever Message Block(SMB) to communicate with each other using sharing services like file and printer. Samba.
© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Advanced Samba Administration Part.
NFS Server Setup NFS SERVER SETUP. Network File Service NFS Server Setup Allows to share Directories between UNIX Systems Daemons: netfs, nfs, nfslock.
VPN Plus Samba Making My Home Computing Environment Identical to My Work Computing Environment.
Configuring Disk Quotas Linux System Administration To implement disk quotas, use the following steps: Enable quotas per file system by modifying /etc/fstab.
Samba Objectives Contents Practical Summary
Samba
1 SAMBA. 2 Module - SAMBA ♦ Overview The presence of diverse machines in the network environment is natural. So their interoperability is critical. This.
Microsoft Windows 2003 Server. Client/Server Environment Many client computers connect to a server.
11 NETWORK PROTOCOLS AND SERVICES Chapter 10. Chapter 10: Network Protocols and Services2 NETWORK PROTOCOLS AND SERVICES  Identify how computers on TCP/IP.
Module 7: Configuring TCP/IP Addressing and Name Resolution.
Windows interoperability with Unix/Linux. Introduction to Active Directory Integration for Unix and Linux Systems Unix/Linux interoperability components.
Windows Interoperability Chris “CJ” Janneck CSE 398 – Sys Admin 4/19/2004.
Lecture – Single Login NIS and Winbind. NIS Network Information Service (NIS) is the traditional directory service on UNIX platforms Still widely used.
1 Chapter Linux/Windows Internetworking. 2 Chapter Objectives Samba Practical Customization of Samba on a Linux Server Setting Up SWAT to Remotely Configure.
VsFTP in Linux. Introduction to FTP The File Transfer Protocol (FTP) is used as one of the most common means of copying files between servers over the.
Ferry Astika Saputra Workshop Administrasi Jaringan SAMBA PROTOCOL.
SAMBA Integrating Linux and Window. What is Samba? Free suite of programs that enables flavors of UNIX to work with other operating systems such as OS/2.
Windows Interoperability. What can Samba do? Allow for peaceful coexistence between Windows and Linux/UNIX systems regarding: File sharing Printer sharing.
SUSE Linux Enterprise Desktop Administration Chapter 12 Administer Printing.
Samba Erik Turner CSIS 4490 Linux Admin & Security Dr. Hoganson.
New SA Training Topic 8: File System Access  Our organization uses a variety of services for accessing files on remote systems  WWW  FTP  CIFS/SMB.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network Chapter 6: Name Resolution.
70-291: MCSE Guide to Managing a Microsoft Windows Server 2003 Network, Enhanced Chapter 6: Name Resolution.
Samba Advanced System Administration Course James Lwali University computing Centre Ltd, University of Dar es salaam,
Samba version What is the Samba? Samba is a suite of programs which work together to allow clients to access to a server's filespace and printers.
Linux+ Guide to Linux Certification, Second Edition Chapter 14 Network Configuration.
Hour 7 The Application Layer 1. What Is the Application Layer? The Application layer is the top layer in TCP/IP's protocol suite Some of the components.
Samba Server Configuration
中華技術學院 Linux 課程 中華技術學院 Linux 課程 Chap Five : Samba 王俊城RHCE/RHCX.
CIS Lesson 10 Printers. CIS Lesson 10.
“Windows Networking” ITL. © Hans Kruse & Shawn Ostermann, Ohio University 2 Overview Networking under Windows Mixture of applications and protocols.
Sys Admin Course NFS and SAMBA Fourie Joubert. Sys Admin Course NFS NFS is the Network File System It allows Linux systems to share a file system, or.
Cosc 4750 Configuring httpd, Mysql, And Samba. defaults By default httpd demean will startup and work User directories are turned off Default directory.
SAMBA Server Message Block File & Print Server. Service Profile Type: System-V managed service Packages: samba-common, samba-client Daemons: nmbd, smbd.
Samba Let’s Dance!. Computer Center, CS, NCTU 2 Network-based File Sharing (1)  NFS (UNIX-based) mountd is responsible for mount request nfsd and nfsiod.
1 Linux Networking and Security Chapter 5. 2 Configuring File Sharing Services Configure an FTP server for anonymous or regular users Set up NFS file.
Windows-Linux Interconnection Campus-Booster ID : **XXXXX Copyright © SUPINFO. All rights reserved Samba.
Linux Operations and Administration
SAMBA (ORIGINAL SLIDES BY DR. JAMES WALDEN, NKU) CT320: Advanced Network and System Administration Slide #1 CT320 : Advanced Network and System Administration.
Samba
Samba Server Samba is used for *share a linux FS with windows-95,98 &NT. *Share printers connected to either linux or Windows systems. *Samba is based.
Unit –III CHAP-I 1 Created By Asst. Prof. Ashish Shah, J.M.Patel College of Commerce.
LINUX - SAMBA
Using Samba Doug Maxwell November 13, 2004 – GHGLUG
Guide to Operating Systems, 5th Edition
Windows interoperability with Unix/Linux
Configuring Disk Quotas
Samba.
File System Implementation
Network Administration Module 09
Exercise 7 Samba.
LINUX ADMINISTRATION 1
Workshop Administrasi Jaringan
Chapter 3: Windows7 Part 4.
Samba.
Samba - SMB yench.
Configuring Disk Quotas
Presentation transcript:

SAMBA Server Message Block File & Print Server

Service Profile Type: System-V managed service Packages: samba-common, samba-client Daemons: nmbd, smbd Script: smb Ports: 137/udp, 138/udp 139/tcp Configuration: /etc/samba/smb.conf

SaMBa Client & Server for the Common Internet File System (CIFS) Microsoft's name for its SMB protocol implementation Contains components of the LanManager and NetBIOS protocols Samba may provide performance improvements over ‘native’ CIFS Hhtp://

The goal of SAMBA A single integrated work-group spanning Windows and Linux machines

The view from Windows Linux based resources look identical to Windows based resources. Using Universal Naming conventions (UNC): \\toltec\spirit

The view from Linux # smbstatus Processing section "[homes]“ Processing section "[printers]“ Processing section "[spirit]“ Samba version Service uid gid pid machine spirit jay jay 7735 maya ( ) Sun Aug 12 12: spirit jay jay 7779 aztec ( ) Sun Aug 12 12: jay jay jay 7735 maya ( ) Sun Aug 12 12:

The view from Linux Locked files: Pid DenyMode R/W Oplock Name DENY_WRITE RDONLY NONE /u/RegClean.exe Sun Aug 12 13:01: Share mode memory usage (bytes): (99%) free + 136(0%) used + 72(0%) overhead = (100%) total

Samba Services Authentication & Authorization of users File & Printer Sharing Name Resolution Comprises part of WINS, allows mapping of NetBIOS names to IP addresses WINS is independent of DNS Browsing (service announcements)

WINS Windows Internet Naming Service (WINS) Microsoft's implementation of NetBIOS Name Server (NBNS) on Windows Handles naming in NetBIOS Workstations preload names at boot Distributed model No hierarchy Deprecated from Windows 2000 onwards DNS and Active Directory preferred but may still be present in mixed environments.

NetBIOS Names 16 Bytes in length 15 bytes for the selected name All standard characters a-z, A-Z, 0-9 and # $ % ^ & ( ) - ' { }. ~ are allowed. It is normal practice to use the same machine name for the DNS record and the NetBIOS record. The 16th byte indicates the unique service provided by the machine E.g. Standard Workstation Serviceis00

Querying NetBIOS names C:\>nbtstat -a toltec NetBIOS Remote Machine Name Table Name Type Status TOLTEC UNIQUE Registered...

Workgroups SMB groups are the same as Windows Workgroups. There are predefined group resource types. Nbtstat output: NetBIOS Remote Machine Name Table Name Type Status METRAN GROUP Registered..__MSBROWSE__. GROUP Registered

Smb.conf sections Similar layout to the windows.ini file split into different [ … ] sections [global]: generic server or global settings which apply to each share [homes]: used to grant some or all users access to their home directories [printers]: defines printer resources and services

Sample global section # Simple global section [global] Log file = /var/log/samba/samba.log Load printers=yes Max log size=50 Netbios name=RHL Server string=Samba Server Workgroup=Tardis

Configuring File and Directory Sharing Shares should have their own [ … ] section Options include Public- can be accessed by guest account Browseable – share is visible in browse lists Writeable – resource is read and write enabled Printable – resource is a printer, not a disk Group: all connections to the share use the specified group as their primary group

Example # share Ronan’s Home Dir [ronan-home] Comment= Ronan’s Home Directory Path = /home/rbradley Browseable=yes Writeable=yes Public = yes createMode=0664 DirectoryMode=0775 maxConnections=1 Printable = no

Printing Printers defined in /etc/cups/printers.conf Global options as follows: [printers] path = /var/spool/samba browsable = yes public = yes guest ok = yes writeable = no printable = yes

Printing [LibertyLane] Comment = Staff Printer LaserJet 5 printer = prll valid users = rbradley smcneally path = /var/spool/prll public = no writeable = no printable = yes By default, samba assumes printing is via cups, this can be overridden with the printing= parameter in the [global] section

Other examples [lp] print command = lpr -s -P %p %s; rm %s printable = yes browseable = no [nec-raw] comment = Main PostScript printer driver for Windows clients printer driver = NEC SilentWriter 95 printable = yes browseable = yes

Supporting WINS Turn WINS support on add in [global]: wins support = yes Specify the name resolution order name resolve order = wins lmhosts hosts bcast This step is unncessary as the default order is host lmhosts wins bcast

Name resolution options host means use the system resolver library to determine the IP address of a name lmhosts means to read name-IP mappings from the NetBIOS lmhosts file /etc/samba/lmhosts If this doesn’t exist, lmhosts lookup will be skipped wins tells the server to maintain a WINS database Names will be added and updated as clients connect bcast uses the NetBIOS broadcast mechanism to find the addresses of all hosts Broadcast storms

Authentication There are a number of mechanisms for implementing Authentication in Samba By setting the security= setting this can be controlled by administrators User: Validation is done on a per-user basis, requiring a local smbpasswd file and also smbusers file Server: Validation done by another server

Local file based Authentication When local file based authentication is used, specify that passwords should be stored encrypted in smb.conf encrypted passwords = yes When server based authentication is used, specify the servers to be contacted for authentication information (used when security option is not user). password server = host1 host2 host3

Adding users and setting passwords with local authentication To add a user smbadduser ronan.bradley:rbradley UNIX Username: Windows Username, need not match Encrypted (by default) passwords stored in /etc/samba/smbpasswd Users added with smbadduser and smbpasswd Users defined in /etc/samba/passwd must exist in /etc/passwd

Passwords with local authentication Encrypted passwords stored in /etc/samba/smbpasswd Users added with smbadduser and smbpasswd Users defined in /etc/samba/passwd must exist in /etc/passwd To add a user smbadduser rbradley:rbradley UNIX Username: Windows Username, need not match Use smbpasswd for subsequent password changes for all users

Winbind winbind maps between windows user and group IDs and unix user and group IDs COMP+rbradley or STUDENT\srooney6 or COMP\STAFF or STUDENT:FT211-4

Linux Client access with Samba Smbclient is the standard client utility, useful for testing and for scripts Smbfs is an optional kernel component which allows Linux to mount an SMB share directly, in similar fashion to mounting an NFS share Not available on UML

Smbclient syntax If you do not specify username%password, smbclient will use the upper case version of USER or LOGNAME variable and the PASSWORD variable (if set) If you use the –U option smbclient –U rbradley%letmein Not a great idea, as the command issued is visible in the history and in the ps information Smbclient includes an ftp-like shell

Sample smbclient –L output smbclient -L toltec added interface ip= bcast= nmask= Password: Domain=[METRAN] OS=[Unix] Server=[Samba 2.2.5] Sharename Type Comment test Disk For testing only, please IPC$ IPC IPC Service (Samba 2.2.5) HP Printer HP 932C on Maya ADMIN$ Disk IPC Service (Samba 2.2.5) Server Comment MAYA Windows 98 MIXTEC Samba TOLTEC Samba ZAPOTEC Workgroup Master METRAN TOLTEC

Samba Daemons Nmbd: NetBIOS name server Resource browsing WINS server Smbd: SMB/CIFS server Authentication and authorization File and Printer Sharing

Samba Daemon When an SMB client starts, it needs to know the IP address being used by a particular host Client broadcasts this request on the network and receives a response from nmbd containing the NetBIOS information

Configuration Testing testparm is used to test the correct configuration of your samba settings To check what access will be granted to a given host, you can also supply the IP address of a given host testparm Will return which resources are accessible to that host

Samba Client smbclient can be used as a command-line file retrieval/transfer tool smbclient //machine/resource cd directory get file Also allows simple view of shared resources smbclient –L hostname user%password may be specified with the –U option or by setting and exporting USER and PASSWORD environment variables

Samba Client If you do not specify username%password, smbclient will use the upper case version of USER or LOGNAME variable and the PASSWORD variable (if set) If you use the –U option smbclient –U rbradley%letmein Not a great idea, as the command issued is visible in the history and in the ps information Smbclient includes an ftp-like shell

Sample smbclient –L output smbclient -L toltec added interface ip= bcast= nmask= Password: Domain=[METRAN] OS=[Unix] Server=[Samba 2.2.5] Sharename Type Comment test Disk For testing only, please IPC$ IPC IPC Service (Samba 2.2.5) HP Printer HP 932C on Maya ADMIN$ Disk IPC Service (Samba 2.2.5) Server Comment MAYA Windows 98 MIXTEC Samba TOLTEC Samba ZAPOTEC Workgroup Master METRAN TOLTEC

smbmount SMB file system can be supported by the LINUX kernel Not available in UML Can use smbmount to mount a SMB-shared resource smbmount service mountpoint –o options smbmount //server/resource /mnt/smb –o username=smbuser Must set CONFIG_SMB-FS set on for smbmount to work

Samba mounts in /etc/fstab Samba mounts can be performed automatically upon system boot by editing /etc/fstab Specify the UNC path the local mount point smbfs as the file system and a username //server1/resource /mnt/smb smbfs deaults,username=nobody 0 0

Samba Resources html