Thứ Sáu, 29 tháng 1, 2016

Configuration instructions and install SAMBA.

In this article, you will know Configuration instructions and install SAMBA.

Samba: protocol Server Message Block (SMB), also called the Session Message Block.

SMB protocol is used to share disks and printers to Microsoft Windows 3.11, NT and 95/98. Use Samba on Linux can share the resources of Linux for Windows. Four basics Samba can do:

- Share Linux disk for Windows
- Share with Linux SMB servers
- Share printers on Linux for Windows
- Share the printer on the Windows for Linux

INSTALL AND CONFIGURATION SAMBA

- Check that Samba has set yet

  -qi rpm samba

+ If you have not installed the terminal screen will return.



+ If you have set the terminal screen will return




- If you haven't SAMBA, you can access on website www.samba.org and you make guidance of the site to download the RPM file. To install, use the command.

rpm –i samba

- From Version 2.0 onwards with utility Swat Samba (Samba administration tools via a Web interface), this tool allows configuring Samba easily. Swat allows you to use a web browser to change directly to the main configuration file of Samba /etc/smb.conf

- The main Samba configuration file /etc/samba/smb.conf

# Samba config file created using SWAT
# from localhost (127.0.0.1)
# Date: 2000/05/25 10:29:40
# Global parameters
[global]
workgroup = ONE
netbios name = TERRY
server string = Samba Server
security = SHARE
log file = /var/log/samba/log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
wins support = Yes
hosts allow = 192.168.1.
hosts deny = all
[homes]
comment = Home Directories
read only = No
[printers]
comment = All Printers
path = /var/spool/samba
guest ok = Yes
print ok = Yes
browseable = Yes
  [test]
path = /tmp/sambatest
valid users = test
read only = no
guest ok = no
browseable = yes

[Global]
[Globe] is the first part of smb.conf, each section in smb.conf including selection and value format: option = values .You have hundreds of choices and values in different formats. Here are the most common formats.

• Workgroup = TuanQL workgroup name appears in the network properties on Windows.
• Netbios name = Linux : It is the name that SAMBA Server will be know by computer Windows.
• Server settings = Samba Server is the name of the Samba server
• Security = SHARE: It is right level on Server , the other levels: User, Default, Domain, Server. Using Share will easily make sharing anonymous, without authentication.
• logfile = / var / log / samba / log directory where log files
• max log size = 50 the maximum space of the log file measured in KB
• socket options = TCP_NODELAY SO_SNDBUF = 8192 SO_RCVBUF = 8192 optimized server
• wins support = Yes samba server acts as a Wins Server
Hosts allow = 192.168.1 •. only allow requests from this network
• hosts deny = all did not receive requests from all hosts

[Homes]

This option allows users to quickly access their home folder
• comment = Home Directories notes
• read only = No users have full capacity in their home folder

[Printers]

Setting up the printer selection
• Path = / var / spool / samba folder of the printer
• Guest ok = yes to allow guest access to the printer
• Print ok = yes to allow users to use the printer
• browseable = yes printer icon will appear in the browse list

[Test]

Configure shared folder on a Linux test
• Path = / tmp / directory path sambatest share
• Valid users = test user specified using this directory
• Read only = No enable write permissions on the folder
• Guset guest ok = No not for access rights
• read only = No users have full capacity in their home folder
• browseable = yes share folder will appear in the browse list

USE SWAT 

Before you can use SWAT, you need to change two files to enable this add up

+ Add to / etc / services

Swat 901 / tcp

+ Add to /etc/inetd.conf

Swat stream tcp nowait.400 root / usr / sbin / swat swat

+ Restart inetd

killall -HUP inetd

- Use a web browser to run Swat http: // localhost: 901.

Dialog box asked to enter a User ID and password appears, log in as root:



- First you must configure the [globals] by clicking on the icon globals



Global variables appear. This value is the value smb.conf file



Global Variables page, it helps us to easily configure [Globals] in the smb.conf file

Global Variables page divided into 6 selection

• Base Options
• Security Options
• Logging Options
• Tuning Options
• Browse Options



Base and Security Options



Logs, tuning, browse, and WINS options

After filling in the necessary values, click Commit Changes to save changes

- Next select the icon to open the Shares Share Parameters



Page Share Parameters

To create a shared fill in the name and press the Create Share share.



Fill in the configuration information for Windows can access the Samba server

Once finished click Commit Changes to save the file smb.conf

- Next printer sharing for Windows machines use. Select the icon PRINTERS



Displays the printer name which you selected

To create a new select Create Printer, if you already have a printer you can choose from the drop-down menu. Note if you have preset printer in RedHat, it will be used as the default printer in the samba and indelibly. Click Commit Changes to save on smb.conf

- After you have finished using the utility testparm to check again. From the screen you type in the command line: testparm



Testparm utility help file error checking smb.conf

- After changing smb.conf file, you must restart samba. You restart Samba with the command: / usr / sbin / samba start or restart Samba with /etc/init.d/samba .To start by Swat you selecting symbols STATUS  . Smbd and nmbd is 2 service must be started.



Server Status page to know the current status of the samba server

- After Samba startup, use the command smbclient on localhost to see the samba configuration information: smbclient -L localhost



SAMBA CLIENT CONFIGURATION

On a Windows Client must be installed "Client for Microsoft Network" and "File and Printer Sharing for Microsoft Networks"



Network Properties Dialog box

CHECK THE SAMBA SERVER

You check everything you have done and to make sure that there will be no errors. On Windows -> Network Neighborhood. In the Network Neighborhood window you can see the list of Windows server the shared folder, you'll find Linux Server. On the Linux machine you can also access the Windows folder with the command smbclient: smbclient // computer name / folder name

So you can configure the Samba server to connect to computers using the Linux operating system with Windows via SMB (Server Message Block). You can also use NFS (Network File System) to share files on your local network, but will be easier to configure if you use Samba.

Không có nhận xét nào:

Đăng nhận xét