الاثنين، 26 ديسمبر 2016

Samba



What is Samba ??

Samba is an Open Source Suite, that provides seamless file and print services to SMB/CIFS clients.
         With Samba, you can share a Linux file system with Windows and vice versa.
You can also share printers connected to either Linux or a system with Windows.
Samba enables a Linux or Unix server to function as a file server for client PCs running
Windows software
Samba is essentially a TCP/IP file and print server for Microsoft Windows clients


It can support any SMB/CIFS-enabled client SMB/CIFS?
SMB is Server (or Session) Message Block
Common Internet File System (CIFS) is Windows File Sharing


(SMB) stands for – Server Message Block


It is a protocol by which a lot of PC-related machines share files and printers and other information such as lists of available files and printers.

Operating systems that support this natively include Windows NT, OS/2, and Linux

SMB was originally developed to run over NetBIOS (Network Basic Input Output System) LANs in the mid-1980
SMB was originally for MS-DOS and PC-DOS Operates as an application-level network protocol
Applied to shared access to Files, printers, serial ports, and miscellaneous communications between nodes on a network

Provides an authenticated Inter-process communication mechanism
Most usage of SMB involves computers running Microsoft Windows
Microsoft environments users often know it simply as "Microsoft Windows Network“
When discussing SMB, one should distinguish:
SMB the protocol
SMB services that run on the protocol NetBIOS
DCE/RPC services that use SMB as an authenticated Inter-process communication channel (over named pipes)
"Network Neighborhood" protocols which primarily (but not exclusively) run as datagram services directly on the NetBIOS transport

Common Internet File System (CIFS)

CIFS is a network file system plus a set of auxiliary services supported by a bunch of underlying protocols
Most of which are not particularly well documented by Microsoft.
CIFS is "Microsoft's way of doing network file sharing“since about 1996
There is no RFC number for SMB or CIFS
Microsoft's implementations are the de facto CIFS standards 

Network File Sharing

SAMBA is an SMB/CIFS file sharing daemon that runs on UNIX hosts.
Clients make SMB requests on the network
Samba accepts SMB file requests from clients and uses UNIX calls to obtain requested file from disks.
Samba returns SMB file information to the client.
SAMBA is free.
TotalNet is another solution which performs the same function.
TotalNet is a commercial product.
Dave” performs the same function for MacOS. (Free)
Xinet is a commercial product that performs the same function.

Installation and Setup

The Samba Server package can be downloaded from the Samba website.
 The file needs to be untared and then configured using a ./configure command in the source directory.
 Then the smb.conf file should be created.
The smb.conf file has three separate sections:
[global] : This section controls parameters for the entire SMB server. It also provides default values for the other sections.
Examples:           workgroup = MYGROUP
                                server string = Samba Server
                                hosts allow = 192.168.1  127.
                                printcap name = /etc/printcap
                                load printers = yes
                                guest account = pcguest
                                encrypt passwords = yes
                                smb passwd file = /etc/samba/smbpasswd

[homes]:  This section allows network clients to connect to a user’s home directory without having an explicit entry in the smb.conf file.
Examples:                          
                                [homes]
                                                browseable = no
                                                writeable = yes
[printers]: This section is used to specify which printers are available.
Examples:
                                [printers]
                                                print ok = yes
                                                printer name = lp_mine
                                                path = /home/everyone
The testparm program helps in testing the smb.conf file once it is configured.


Sharing files and print services:

Example of directory or file share:
                [jacksdir]
                                comment =  remote source code directory
                                path = usr/local/src
                                valid users = abc
                                browseable = yes
                                public = no
                                writeable = yes
                               
Example of printer sharing:
                [vals_lp]
                                print ok =yes
                                printer name = lp_mine
                                path = /home/everyone
                                valid users = user@server.co
                                browseable = yes       
                   
Available permissions


The following Access Control List permissions can be granted:
Lookup (l)
allows a user to list the contents of the AFS directory, examine the ACL associated with the directory and access subdirectories.
Insert (i)
allows a user to add new files or subdirectories to the directory.
Delete (d)
allows a user to remove files and subdirectories from the directory.
Administer (a)
allows a user to change the ACL for the directory. Users always have this right on their home directory, even if they accidentally remove themselves from the ACL.
Permissions that affect files and subdirectories include:
Read (r)
allows a user to look at the contents of files in a directory and list files in subdirectories. Files that are to be granted read access to any user, including the owner, need to have the standard UNIX "owner read" permission set.
Write (w)
allows a user to modify files in a directory. Files that are to be granted write access to any user, including the owner, need to have the standard UNIX "owner write" permission set.
Lock (k)
allows the processor to run programs that need to "flock" files in the directory. See the UNIX man page for "flock" for more details.










By : mogtaba altyib 
Modification by : Mohammed Bakry PhD

ليست هناك تعليقات:

إرسال تعليق