• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Samba
 

Samba

on

  • 2,310 views

The Samba Server

The Samba Server

Statistics

Views

Total Views
2,310
Views on SlideShare
2,309
Embed Views
1

Actions

Likes
0
Downloads
43
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Samba Samba Presentation Transcript

    • Connecting Windows to Linux March 4,2001 Professor Tom Mavroidis
    • Integrating Linux with Windows
      • There are two methods for integrating Linux into Windows
      • You can:
        • Load SMB on Linux or
        • Load NFS on Windows
    • What is Samba?
      • Samba is a suite of Linux applications that speak the SMB (Server Message Block) protocol. Many operating systems, including Windows and OS/2, use SMB to perform client-server networking.
    • Why use SAMBA?
      • Samba allows Linux servers to communicate with the same networking protocol as Microsoft Windows products.
    • What does SAMBA do?
      • A Samba-enabled Unix machine can masquerade as a server on your Microsoft network and offer windows services.
    • How does Samba look?
      • It shows up on the Network Neighborhood or My Network Places same as any Microsoft winxx server that has file sharing enabled
    • Mapping a Linux network drive to Windows
      • Drives are mapped using My Computer icon in Windows
    • Where can I get SAMBA?
      • The latest product can be downloaded from www.samba.org
      • You should learn to download and compile the latest version of Samba since it changes regularly
    • Two parts to Samba
      • The client and the server
      • Linux can access an NT or 2000 share (client)
      • A Microsoft Machine can see your Linux box as a file server
    • SMB - Server Message Block
      • Many server products are built around SMB ’s
      • SMB is not a documented protocol, it is Microsoft proprietary
      • Samba was constructed by two main architects Andrew Tridgell and Jeremy Allison
    • SMB Clients & Servers
      • All windows networked computers communicate with each other via Server Message Blocks ( SMB )
      • SMB looks at nodes as both client and server simultaneously making them peer to peer networks
    • Workgroup Names
      • Windows machines know each other by a unique workgroup and name combination
      • A workgroup is a collection of SMB computers that all reside on a subnet and subscribe to the same SMB group
    • NetBios
      • Named pairs must resolve to a unique hardware address
      • This scheme is known as NetBios or Network Basic Input/Output System
    • Netbios
      • Designed primarily for local networks
      • No routing information is carried in the packet headers
      • To communicate across lan segments packets must be encapsulated within a routable protocol I.e. TCP/IP
    • NetBT or TCPBEUI
      • Are the network protocols that supports the encapsulation
      • You must have TCP/IP installed to use SAMBA
      • Samba also supports WINS (Windows Internet Name Service) with DNS to provide IP to Hardware address resolution
    • Daemons
      • Two server daemons nmbd and smdb make up SAMBA
      • smbd handles resource sharing and user authentication
      • nmbd is responsible for resource advertising and communicating with other SMB machines
    • Samba Components
      • Smbclient - client side tool
      • smbmount - for mounting shares
      • smbprint - for printing
      • sbmstatus - displays connections
      • smbpasswd - authenticates users
      • nmblookup - handles NetBios name queries
      • testparms - verify SAMBA configuration file
      • testprns - tests printer shares
      • swat - inetd service which allows web based admin of SAMBA
    • SWAT
      • A web based configuration tool
    • History
      • May 1985 IBM Publishes a specification for a local network based on NetBios
      • Late 1980’s IBM & Microsoft develop a peer networking program, LAN Manager 1.0 released as LAN Manager for DOS
    • History continued
      • Microsoft & IBM part ways
      • Microsoft becomes bearer of of SMB protocol
      • IBM develops OS2 with limited DOS compatibility
      • Microsoft continues enhancing SMB
    • Precautions
      • You should have administration rights in the Windows NT domain
      • Misconfigured SAMBA can cause problems for everyone in the domain
    • Parameters needed
      • Name of the Windows NT domain or the name of the local workgroup if peer to peer
      • IP addresses of any WINS servers on this domain
      • Names of users and groups in the Windows NT domain that will access services in SAMBA
    • Enable the swat service
      • Find the service listed in the /etc/inetd.conf file
      • Uncomment the line for swat
      • Restart inetd
        • $ killall _HUP inetd
        • swat runs on port 901
    • Configuration File
      • /etc/smb.conf
      • Two overall sections
        • global parameters
        • share definitions
    • Assumptions
      • Windows will handle browsing
      • Windows will handle name resolution issues
    • Browsing
      • Unless specified the computer name is assumed to be the same as the TCP/IP host name
      • Explicitly specify the domain or workgroup name in the smb.conf file
      • [global]
        • netbios name = SENECANODE
        • workgroup = SENECADOMAIN
        • comment = Seneca SAMBA share 750
    • Master Browser
      • Only one node is elected as the master browser
      • In NT it is usually the Primary domain controller
    • Nodes
      • The first node on line is deemed the master browser
      • Subsequent nodes look for the master browser
    • Agreeing on the master browser
      • NetBios nodes agree on who should be handling browsing issues
      • Any NetBios machine may act as the master browser
      • If the master goes off line another master browser is elected
    • Source of Problems
      • During an election every node announces its NetBios name and hardware address
      • A thousand node network can generate tremendous network traffic called a packet storm
    • Losing Browser Election
      • We want SAMBA to always lose browser election
      • Set the OS level parameter in /etc.smb.conf to 1
        • os level = 1
        • local master = no
        • domain master = no
        • preferred master = no
    • Do not attempt browser synchronization
      • Do not announce to the network
      • Comment or delete the following lines
        • ; remote browse sync =
        • ; remote announce =
    • WINS information
      • Tell SAMBA where the WINS server is and not to act as a WINS server
        • wins server = 192.168.1.1 (sub)
        • win support = no
    • Setup name resolution order
      • Modify dns or /etc/hosts
        • name resolv order = wins host
        • Checks wins first, host second
    • User authentication
      • Windows NT 4 SP3 changed to encrypted passwords
      • We will assume encrypted passwords
      • Use user level authentication not share level, it is more secure
    • Authentication Parameters
        • Security = user
        • encrypt passwords = yes
        • null passwords = no
        • smb passwd file = /etc/smbpasswd
        • unix password sync = no
        • ;do not restrict host access , comment out
        • ; allow hosts =
        • ; deny hosts =
    • Explicitly state interfaces
      • Only needed if more than 1 interface is installed
      • Interfaces = eth0
      • Tell SAMBA how to handle TCP transmissions
      • socket options = TCP_NODELAY SO_RECVBUF=8192 SO_SNDBUF=8192
    • Case Sensitivity
      • Use the windows NT way
        • default case = lower
        • case sensitive = no
        • preserve case = yes
        • password level = 0
    • Testing the config
      • Testparm tests the configuration and reports any syntax errors
      • Only syntax is tested not context
    • Starting the server
      • Both smbd and nmbd need to be started
      • $ /etc/rc.d/init.d/smb start
      • Check the log files /var/log/samba/ log.smb and log.nmb for errors
    • Adding Samba users
      • Use the perl script smbadduser
      • $smbadduser linuxid:ntid
      • The linux and NT user must already exist
    • Defining File Shares
      • [sharename]
        • comment = Seneca Share
        • path = /senecadir
        • guest ok = yes
        • browseable = yes
        • writable = yes
        • read list = usernames
        • write list = usernames
        • admin list = usernames
    • Defining Printer Shares
      • [global]
        • Printing - bsd
        • printcap name = /etc/printcap
        • load printers = yes
      • Printcap is the printer config file
    • Printer definitions
      • [printers]
        • comment = All Printers
        • browseable = no
        • printable = yes
        • public = no
        • read only = yes
        • create mode = 0700
        • directory = /tmp
    • Regarding Printing
      • SAMBA routes printing by default through LPD specified using printing = bsd
      • Printers can be directly configured with printtool
    • Client Setup
      • Three main client programs
        • smbclient
        • smbmount
        • smbprint
        • Print requests must be sent through the local print filters
    • Connecting to an SMB share
      • Mounting
        • $ smbmount //servername/sharename /localpath -o options username= ?user? password= ?password?
    • SAMBA 2.0
      • Has more concrete support for NT Domains
      • a user can log in to a Windows NT domain and use all the computers in the domain without logging into them individually
    • Performance
      • Name/browsing service now supports 35,000 simultaneous clients
      • File and print services support many concurrent users without noticeable performance degradation.
    • Performance
      • Linux/Samba on identical hardware now consistently performs better than NT Server
      • Improved locking allows client machines to cache entire files locally, improving speed
      • and many more
    • End of Presentation