RedHat 5 configure the Samba server

Source: Internet
Author: User

1. Check the installation package

# Rpm-Qa | grep samba

The following installation results are required:

Samba-3.0.25b-0.el5.4
Samba-common-3.0.25b-0.el5.4
Samba-client-3.0.25b-0.el5.4
Samba-swat-3.0.25b-0.el5.4

If not, install the corresponding installation package.

2. Prepare the samba installation package.

# Mount/dev/CDROM/mnt/CDROM

# Cd/mnt/CDROM/service

# Ls samba *

Samba-3.0.25b-0.el5.4.i386.rpm samba-common-3.0.25b-0.el5.4.i386.rpm
Samba-client-3.0.25b-0.el5.4.i386.rpm samba-swat-3.0.25b-0.el5.4.i386.rpm

# Cp samba */home/redhat_service/samba/

# Rpm-IVH samba-3.0.25b-0.el5.4.i386.rpm

# Rpm-IVH samba-common-3.0.25b-0.el5.4.i386.rpm

# Rpm-IVH samba-client-3.0.25b-0.el5.4.i386.rpm

# Rpm-IVH samba-swat-3.0.25b-0.el5.4.i386.rpm

The installation will be smooth along the way, but the following installation problems may occur:

Xinetd is needed by samba-swat-3.0.25b-0.el5.4.i386

Solution:

# Cd/mnt/CDROM/service

# Cp xinetd-2.3.14-10.el5.i386.rpm/home/redhat_service/xinetd

# Rpm-IVH xinetd-2.3.14-10.el5.i386.rpm

In the back to install the samba-swat-3.0.25b-0.el5.4.i386.rpm is not good error.

Check whether the software package is installed. If the following information is displayed, it indicates OK.

# Rpm-Qa | grep samba

Samba-3.0.25b-0.el5.4
Samba-common-3.0.25b-0.el5.4
Samba-client-3.0.25b-0.el5.4
Samba-swat-3.0.25b-0.el5.4

3. Configure the samba service by modifying the configuration file

# Cd/etc/samba

# Vi smb. conf

Specific File Modification

[Public]
Comment = public directories
Browseable = Yes
Writable = Yes
Path =/home
Valid users = root
; Valid users = mydomain \ % s

# Service SMB restart

shutting down SMB services: [OK]
shutting down nmb services: [OK]
starting SMB services: [OK]
starting nmb services: [OK]

Enter:

\ 192.168.0.4

You will find a classic error. At first I thought it was a problem with the configuration file settings. Otherwise, to solve this problem, you just need to enter it in your terminal:

# Setenforce 0

To temporarily stop The SELinux service. It's a bit difficult. Once you enter this command, Your SAMBA service will run normally. However, if you start SELinux again, your SAMBA service will not work, and it is not very clear. You only need to share the mounted files, as long as you can see what protection is mentioned in the document, nothing else can be done.

3. Configure the samba service through web

Modify the/etc/xinetd. d/Swat File

# Default: Off
# Description: SWAT is the Samba Web Admin Tool. Use SWAT \
# To configure your Samba server. To use SWAT ,\
# Connect to port 901 with your favorite Web browser.
Service SWAT
{
Port = 901
Socket_type = stream
Wait = No
Only_from = 127.0.0.1
Only_from = 192.168.0.0
User = root
Server =/usr/sbin/Swat
Log_on_failure + = userid
Disable = No
}

Check the port used by SWAT

# Netstat-NLP | grep xinetd

TCP 0 0 0.0.0.0: 901 0.0.0.0: * Listen 3685/xinetd

Save the configuration file and restart the service.

Service xinetd restart

Stopping xinetd: [OK]
Starting xinetd: [OK]

Open a browser and follow the instructions.

 

Notes:

1. Change the IP address to a static IP Address:

# Setup

Select network settings and static IP.

1. smb. conf

The files in are; and #, which are actually comments to the project, but; indicates that this option is optional.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.