Network-based File Sharing (1)

Similar documents
Network-based File Sharing

CIFS ON OPENVMS. Tips and Hints. Paul Bakker, Hans Hosang. Platform Integration Competency Center.

Lab #10: Using Linux with Microsoft Windows

Setting Up SAMBA. And the response was: salmonberry samba sawtimber scramble. Thus, the name Samba was born.

Sample Configuration File

Install and Configure Samba - CentOS 7

Samba. Alain Knaff. Linuxdays, Samba. Alain Knaff. Installing. Basic config PDC. Printing. Misc gimmicks. Conclusion

Red Hat Enterprise Linux Red Hat Enterprise Linux Deployment Guide

ClearCase and Samba. A Supported Configuration. Lonnie Roscillo and Sue Meany. December 12, ClearCase Support Whitepaper

The Samba-3: Overview, Authentication, Integration

RHCE BOOT CAMP. File Sharing Services. Wednesday, November 28, 12

The Samba-3 Enchilada: Overview, Authentication, Integration

Hemanth Thalak Dattatreya. Wendy Cheng. Wendy Cheng, 19447, Pruneridge Avenue, M S 47, Cupertino, CA

Implementing a Primary Domain Controller for Windows 2000 Clients using Samba

Filesharing. Jason Healy, Director of Networks and Systems

Samba in Business. John H Terpstra

configure samba for some basic file service tasks

Developing Management Strategies and Tools for Samba. Jeffrey Bianchine

Chapter 6: Connecting Windows Workstations

Clustered NAS For Everyone Clustering Samba With CTDB. NLUUG Spring Conference 2009 File Systems and Storage

IBM Iseries linux technical solutions v5r.

1 of 6. How to set up Permissions. Re: How to set up Permissions. Re: How to set up Permissions. Re: How to set up Permissions

CIS 192 Linux Lab Exercise

Clustered NAS For Everyone Clustering Samba With CTDB A Tutorial At sambaxp 2009

15. Creating a Samba Server in Knoppix v.3

SMB. / / 80-. /,,,, /scalability/ mainframe. / . ",,!. # $ " fail sharing,,. % ,,. " 90-, 12, /.! database.! /DBMS/.

Part Five. Appendixes

Robert Eckstein, David Collier-Brown, Peter Kelly 1st Edition November , Order Number: pages, $34.95

Sharing files and printers with Microsoft Windows

Bull. FastConnect Version 3.2 Guide AIX ORDER REFERENCE 86 A2 60EM 01

SMB / CIFS TRANSACTIONS PERFORMANCE ANALYSIS. Performance Vision 2015

Learning the Samba Configuration File

Software Tips-1. Soma s Software Tips. Software Tips for the X-Ray Facility

Clustering Samba With CTDB A Tutorial At sambaxp 2010

Clustering Samba With CTDB A Tutorial At sambaxp 2010

SIOS Protection Suite for Linux v9.0. Samba Recovery Kit Administration Guide

Applied Biosystems SQL*LIMS Technical Support Technical Note

NFS Design Goals. Network File System - NFS

Project #4: Implementing NFS

HPE Common Internet File System (CIFS) Server Release Notes Version B for HP-UX 11i v3

Sair 3X Samba Resource Sharing.

COMMON INTERNET FILE SYSTEM PROXY

Making the Migration to Linux using Vampire. Matt Skipton Technology Specialist Datacenter & Workgroup Novell, Inc.

Współdzielenie plików samba Pakiety do instalacji: samba, smbclient apt-get install samba smbclient

Guide to TCP/IP, Third Edition. Chapter 12: TCP/IP, NetBIOS, and WINS

JMS USB 2.0 Hi-Speed-Port MFP Server

Wireless and Dorm Printing Overview

Samba4 Progress - March Andrew Tridgell Samba Team

Configuring and Managing WAAS Print Services

Migration of NT4 to Samba-3

Running And Troubleshooting A Samba/CTDB Cluster. A Tutorial At sambaxp 2011

2 Bay 3.5 HDD SATA NAS Media Server Setting...20 Bonjour...21 TorrentFlux Maintenance...25 Disk Utility...25 RAID Setting...

Configuring and Troubleshooting MS DFS links in an HP CIFS Server (Samba) Environment

User Guide. NP Port USB Print - Scanner - Storage Server

One Bay SATA/IDE Turbo NAS User Manual

Configuring and Managing WAAS Legacy Print Services

Preface to the First Edition Preface to the Second Edition Acknowledgments UNIX Operating System Environment p. 1 UNIX: Past and Present p.

SIOS Protection Suite for Linux Samba Recovery Kit v9.2. Administration Guide

Table des matières. SAP NetWeaver 7.5 on SUSE Linux Enterprise Server for SAP. Installation Guide

HP CIFS Server Administrator's Guide Version A.03.01

LevelOne FPS port USB/MFP Server. User`s Manual

Enable printing from Windows and Macs remotely through Linux Print server - Share Brother Printer DCP-1610W with Linux CUPS and Samba Windows Share

CHAPTER1 INTRODUCTION...

FILE EXCHANGE PROTOCOLS AND ZERO CONFIGURATION NETWORKING

SIOS Protection Suite for Linux Samba Recovery Kit v Administration Guide

DISTRIBUTED PROCESSING SOFTWARE ENVIRONMENTS

Web Server rpm. Web Server. #rpm q apache apache sis. package apache not installed CD-ROM

FreeBSD Security Advisories

Setup Smart Login for Windows V2

FreeBSD Security Advisories

Samba4 Status - April Andrew Tridgell Samba Team

Distributed Systems. Hajussüsteemid MTAT Distributed File Systems. (slides: adopted from Meelis Roos DS12 course) 1/25

COMPUPRINT SP40. Ethernet 10/100Base-T Connection Installation Guide

SDC EMEA 2019 Tel Aviv

QuickSpecs. HP Advanced Server V5.1B-5 for UNIX. Overview. Retired

HP CIFS Server Administrator Guide version A

7 Distributed File Systems

Networking i5/os NetServer

Linux Servers. Paul Cobbaut

Prepared by Shiba Ratna Tamrakar

Distributed file systems

TELE 301 Lecture 8: Post

SharkFest 16 Europe. Windows Filesharing De-Mystified: SMB with a Eureka! Effect. Eddi Blenkers. October 19th packethunter.

Copyright (c) 1999 by O'Reilly & Associates. This book, Using Samba, first edition, was written by Robert Eckstein, David Collier-Brown, and Peter

680 Subject Index. fake directory create times, 524 fake oplocks, 167, 524 File Naming Conventions, 162 File System, 160 case sensitivity, 161

The PC NetLink Software Architecture

4. Note: This example has NFS version 3, but other settings such as NFS version 4 may also work better in some environments.

64 - Samba Server (Server Message Block)

SMB Analysis OPSEC 2016

Installing and Administering the CIFS/9000 Server

CSE 265: System and Network Administration

1. Add these options in kernel configuration file and recompile the kernel

Centrify Infrastructure Services

10/100Mbps 2Port USB2.0 MFP Server

8.9.2 Lab: Configure an Ethernet NIC to use DHCP in Windows Vista

Océ Copier/Printer. Connectivity Manual

These selected protocol definitions are extremely helpful in learning the

DELL EMC UNITY: DR ACCESS AND TESTING. Dell EMC Unity OE 4.5

This solution will work with any Lawson-supported version of Unix. Specifically, this document references IBM AIX v4.3.3 and SAMBA 2.0.

FreeBSD Security Advisories (1)

Transcription:

Samba Let s Dance!

Network-based File Sharing (1) NFS (UNIX-based) mountd is responsible for mount request nfsd and nfsiod Based on RPC CIFS (Microsoft) Common Internet File System 網路芳鄰 SMB (Server Message Block) Share access to files, printers, Based on NetBIOS 2

Service of SMB and NetBIOS NetBIOS Name Service for name registration and resolution Session service for connection-oriented communication Datagram distribution service for connectionless communication SMB File and printer sharing service Authentication 3

NetBIOS Network Basic Input/Output System NetBIOS (API) 1983 developed as an API for software communication over IBM s PC- Network LAN 1985 Microsoft created a NetBIOS implementation for its MS-Net network topology Difference between local filesystem and network filesystem when accessing Used to share or access network-based filesystem just as BIOS does in local filesystem NetBEUI NetBIOS Extended User Interface Transfer NetBIOS commands across network Each host can claim a name not used in network NetBIOS Name Server or not NetBIOS over TCP/IP 4

NetBIOS Naming Service Peer to peer (Workgroup model) 5

NetBIOS Naming Service Domain model WINS Computer Center, CS, NCTU 6

SMB Server Message Block SMB Original designed by IBM with the aim of turning DOS interrupt local file access into a network filesystem Run on top of netbios 1990 Microsoft merged the SMB protocol with LAN Manager 1992 Microsoft merged and add features to SMB protocol in Windows for Workgroup 1996 Microsoft renames SMB as CIFS Support for symbolic link, hard link, larger file sizes, 2006 Microsoft introduced SMB2 with Windows vista Windows 7 SMB 2.1 Performance enhancement with a new opportunistic locking 7

UNIX-Windows communication SAMBA 1991 Andrew Tridgwell developed the first version of Samba Using a packet sniffer on DEC Pathworks server software A UNIX application that speak SMB protocol Can not use the Original Name: Server Message Block (SMB) Samba Why samba? 8

What SAMBA can do? Sharing Sharing files or printers just like Microsoft does Authenticate user identity just like Microsoft does Resolve NetBIOS name just like Microsoft does 9

Install SAMBA Using ports % cd /usr/ports/net/samba34 Samba3.5.6 support for SMB2 % portmaster BD net/samba34 10

SAMBA components Configuration files /usr/local/etc/smb.conf.default /usr/local/etc/smb.conf /usr/local/etc/lmhosts Major execution files smbd (/usr/local/sbin/smbd) Management of sharing directories, files and printers nmbd (/usr/local/sbin/nmbd) Resolve NetBIOS name and manage workgroup smbpasswd (/usr/local/bin/smbpasswd) Change a user s SMB password 11

SAMBA configuration file smb.conf Sections Three default sections Global Setting Printer Sharing Setting Home Sharing Setting # comments [global] para1 = value1 [printers] para2 = value2 [homes] para3 = value3 [share-dir] para4 = value4 12

SAMBA configuration file Global Setting (1) Global Configuration workgroup Group name to join Ex: workgroup = chwong server string Description of this host Ex: server string = Samba Server of SA Course netbios name NetBIOS name of this host Ex: netbios name = sabsd Charset Settings display charset, unix charset, dos charset Ex: display charset = UTF8 unix charset = UTF8 dos charset = UTF8 hosts allow Apply to all services, regardless or individual service setting; Ex: hosts allow = 140.113.235., 140.113. 13

SAMBA configuration file Global Setting (2) guest ok (or public = yes) If this is yes, no password is required Ex: guest ok = no guest account If guest can use this samba service, any guest request will map to this guest account Ex: guest account = ftp Add this account into your /etc/passwd Otherwise, the user nobody is used log file Full path of log file Ex: log file = /var/log/samba/log.%m max log size (KB) Ex: max log size = 500 14

SAMBA configuration file Global Setting (3) security = [share/user/server/domain] share: no need of id and password to login user: default option, login with id and password server: check id and password by another server domain: check id and password by domain controller Ex: security = user passdb backend = tdbsam 15

SAMBA configuration file Global Setting (4) Example of global setting [global] workgroup = chwong server string = sabsd samba server netbios name = sabsd display charset = UTF8 unix charset = UTF8 dos charset = UTF8 printcap name = /etc/printcap load printers = yes printing = cups log file = /var/log/samba/log.%m max log size = 500 security = user passdb backend = tdbsam 16

Samba parameters Default parameters in samba %m Client NetBIOS name %M Client Hostname %I Client IP %L Samba server NetBIOS name %h Samba server Hostname %H User home directory %U Login name %T Current Date time 17

SAMBA configuration file Home Sharing Setting (1) Home sharing setting comment Description of this directory path Sharing directory path browseable Display sharing name or not read only, writeable write list Only users on this can write content if read only create mode / create mask Default permission when file is created directory mode / directory mask Default permission when directory is created guest ok (or public = yes) 18

SAMBA configuration file Home Sharing Setting (2) Example of home sharing [Image] comment = Book Picture path = /home/image read only = no public = yes writable = yes create mode = 0664 directory mode = 0775 19

Starting SAMBA Script /usr/local/etc/rc.d/samba.sh {start stop} /etc/rc.conf samba_enable= YES smbd_enable= YES nmbd_enable= YES 20

SAMBA password smb password file Now samba stores accounts and passwords in tdb Default database path: /var/db/samba smbpasswd command -a -d -e Add new user Let some account in smbpasswd file can not login (to disable) Let some disable account resume (to enable) 21

smbstatus Report on current Samba connections hscc[~] -chiahung- smbstatus Samba version 3.0.37 PID Username Group Machine ------------------------------------------------------------------- 47945 hscc hscc hscc-d30aedc531 (140.113.240.124) 48533 Pegasus hscc simba-pc (140.113.240.135) 47944 zn hscc bdeca39d90d4 (140.113.240.133) Service pid machine Connected at ------------------------------------------------------- zn 47944 bdeca39d90d4 Mon Oct 18 17:12:02 2010 hscc 47945 hscc-d30aedc531 Mon Oct 18 17:12:02 2010 Pegasus 48533 simba-pc Mon Oct 18 17:58:46 2010 Locked files: Pid Uid DenyMode Access R/W Oplock SharePath Name Time -------------------------------------------------------------------------------------------------- 47947 509 DENY_NONE 0x100001 RDONLY NONE /home/hscc UG/Films/[USA 22 47946 509 DENY_NONE 0x100001 RDONLY NONE /home/hscc UG/Animation

Tool: smbclient (1) A client program that can talk to an SMB server Usage: -L [hostname] List sharable resource -U [username] Login with username 23

Tool: smbclient (2) hsccws5[~] -chiahung- smbclient -L hscc -U chiahung Enter chiahung's password: Domain=[HSCCLAB] OS=[Unix] Server=[Samba 3.0.37] Sharename Type Comment --------- ---- ------- IPC$ IPC IPC Service (HSCC SAMBA) chiahung Disk Home Directories Domain=[HSCCLAB] OS=[Unix] Server=[Samba 3.0.37] Server Comment --------- ------- HSCC HSCC SAMBA Workgroup Master --------- ------- EC219 EC219 HSCCLAB HSCC LAB635 JJSU-LABPC LAB636 2AMW1GP6PMLTL77 24

SWAT (1) Edit /etc/inetd.conf Unmark swat stream tcp nowait/400 root /usr/local/sbin/swat swat Restart inetd Browse http://sabsd.cs.nctu.edu.tw:901/ 25

SWAT (2) Root access Computer Center, CS, NCTU 26