200 likes | 444 Views
SAMBA. Module - SAMBA. Overview The presence of diverse machines in the network environment is natural. So their interoperability is critical. This module focuses on SAMBA which is an advanced Windows-to-UNIX interoperability package. Lessons covered in this module SAMBA Configuration
E N D
Module - SAMBA Overview The presence of diverse machines in the network environment is natural. So their interoperability is critical. This module focuses on SAMBA which is an advanced Windows-to-UNIX interoperability package. Lessons covered in this module SAMBA Configuration SAMBA Domains Using SAMBA
Lesson 1 - SAMBA Configuration Introduction The process involved in configuring SAMBA ensures interoperability with other networks. This helps in accessing Windows resources from Linux machines and vice versa. Topics covered in this lesson Checking and Installing SAMBA Packages Server Configuration Client Configuration
Topic 1 – Checking and Installing SAMBA To check whether Samba is installed type the following command. root@server1~]# rpm –qa samba* (* is used for wild character) If Samba is not installed, the prompt will return saying so. If Samba is installed, the RPM query returns the version number of Samba. Red Hat Enterprise Linux includes three Samba packages: Samba, Samba-client, and Samba-common installed during the system installation. You can obtain the latest version of Samba from its Web site: samba.org. Follow the instructions there and download the RPM file for your distribution.
Topic 2 – Packages Samba consists of two key packages or programs smbd and nmbd. Their job is to implement the four basic CIFS (Common Internet File System) services, which are: File print services, Authentication and Authorization, Name resolution, Service announcement (browsing). smbd provides file and print services. It also handles "share mode" and "user mode" authentication and authorization. nmbd provides name resolution and browsing. Name resolution is of two types: broadcast and point-to-point. A machine may use either or both of these methods, depending upon its configuration.
Topic 3 – Server Configuration The Samba configuration file is called smb.conf and is located in the /etc/samba directory by the installation program. samba-swat GUI interface can be used for configuring Samba. The Samba configuration file smb.conf has different sections: [global] for global settings [homes] for access to the users into their home directories [printers] for printer services Use the testparm tool to test Samba configurations Contd…
Topic 3 – Server Configuration The easiest way to begin configuring Samba is to start with the minimal configuration. You can later add to it. So at first you can just create a workgroup, name your server, and add a simple file share. The first section of the smb.conf file, the [global] section contains settings that apply to the entire server and default settings that may apply to the other shares. The next section [homes] of the smb.conf file enables the Samba server to give users quick access to their home directories. The [printers] section sets the options for printing. After modifying and saving the /etc/samba/smb.conf file, check the syntax of the file using testparm command. Pressing Enter displays the contents of the configuration file, the smb.conf . The command to start Samba is: root@server1~]# service smb start
Topic 4 – Client Configuration Create a user and test it as follows: For Windows machine or a Linux machine using smbmount //server’s ipaddress/sharedname /mnt/samba This utility creates only the users' accounts and not their passwords. You need to create passwords for your users by using the smbpasswd command. On a windows machine go to network places click on view workgroup computers, then click on Microsoft Windows Network. Then you will see the samba server location as shown in the picture.
Lesson 2 – SAMBA Domains Introduction When machines in Windows domain and Linux domain interoperate using SAMBA they are in the SAMBA domain with SAMBA as a domain controller. SAMBA has many utilities useful for this purpose. Topics covered in this lesson Utilities Domains and Support SAMBA as Domain Controller
Topic 1 - Utilities smbclient is a simple SMB client, with an interface like that of the FTP utility. It can be used from a Unix system to connect to a remote SMB share, transfer files, and send files to remote print shares. nmblookup is a NetBIOS name service client. It can be used to find NetBIOS names on a network, lookup their IP addresses, and query a remote machine for the list of names it ownes. swat is the Samba Web Administration Tool. It allows you to configure Samba remotely, using a web browser. For this you require samba-swat package.
Topic 2 – Domains and Support Adding users to a Samba domain has three steps as follows: Add a Linux user on the Samba server Create a Samba smbpasswd that maps to the new Linux user Map a Windows drive to the user's Linux home directory Samba supports domain groups to allow group members to have Administrator rights on each machine in the domain. They can add software and configure network settings. Removing users from SAMBA domain as this following steps: Delete the user using the smbpasswd with the -x switch Delete corresponding the Linux User by normal deletion process
Lesson 3 - Using SAMBA Introduction Using SAMBA in an effective way is essential to communicate across networks. It can be used to join Windows workgroups and Domains with different versions of Windows machines. It can be used to access Windows shares from Linux machines. Topics covered in this lesson Joining a Windows Work Group/Domain. Accessing Windows Shares Performance Tuning
Topic 1 - Joining a Windows Work Group/Domain There are many types of Windows programs installed and each has its own procedure for joining a domain. Windows 95/98/ME and Windows XP Home- These machines do not implement full domain membership and so do not require machine trust accounts. Windows NT- Create a manual Samba machine trust account. Windows 200x and Windows XP Professional- For these machines, create a dynamic Samba machine trust account
Topic 2 - Accessing Windows Shares On the Windows machine double-click the ‘My Network Places’ from the desktop. In the Network Places window, you should see a listing for your Red Hat machine. Double-click your machine icon, and you will see the shares you made available. When you double-click the directory share from your Linux machine, you are prompted for a username and password to enter the directories. Enter them and now you can share files between your Linux and Windows computers.
Topic 3 - Performance Tuning There are three options in smb.conf file to improve server performance: Auto disconnect- To disconnect after some idle time, set this global option in the smb.conf file. deadtime - 60 Limit connections- Add the following to a share smb.conf file to limit the maximum number of connections, for example, to 20: max connections - 20 socket options- This enables the server to be tuned for better performance. TCP-NODELAY is a default value; the BuF values set send and receive buffers. socket options - TCP-RODELAY 50-RCVBUF=8192 80_SMD- BUP-8192
Lab Exercises Configuring a working SAMBA server accessible to several users with smbclient.
Conclusion Summary Samba packages are: Samba, Samba-client, and Samba-common. The two key programs smbd and nmbd implement the four basic CIFS services. A domain controller configuration can be achieved with a simple configuration using the new tdbsam password backend. There are many types of Windows programs installed and each has its own procedure for joining a Samba domain. Options to improve server performance: auto disconnect, limit connections and socket options. Question and Answer Session