Install and configure samba in yum in centOS

Source: Internet
Author: User
Note: the principle in this article is to only apply file sharing to intranet servers and give the directory to be shared full read/write permissions. readers can follow the ideas in this article to complete the basic configuration process, for more information, see http://blog.csdn.net/linglongwunv/archive/2010/01/19/5213337.aspx. 1. # yum-yinstallsamba use the yum command to install samba

Note: the principle in this article is to only apply file sharing to intranet servers and give the directory to be shared full read/write permissions. readers can follow the ideas in this article to complete the basic configuration process, for more information, see http://blog.csdn.net/linglongwunv/archive/2010/01/19/5213337.aspx.

1. # yum-y install samba
Use the yum command to install samba and add the-y parameter. if you are asked to automatically select y, automatically download and install samba. this process takes some time.

2. # rpm-qa | grep samba
Check the installation of the samba service package. the following two packages are displayed:
Samba-common-3.0.33-3.7.el5_3.1 // files required by both the server and client
Samba-3.0.33-3.7.el5_3.1 // server files

3. # whereis samba
Because yum is used for installation, you can use this command to view the samba installation location and obtain the following content:
Samba:/etc/samba/usr/lib/samba/usr/share/man/man7/samba.7.gz

4. # vi/etc/samba/smb. conf
According to step 3, locate smb. conf and configure samba:
(1) [global] locate the global settings tag and configure it below
Workgroup = MYGROUP find this row and change it to workgroup = WORKGROUP. here, the default "WORKGROUP" of Windows XP is used as an example.
; Hosts allow = 192.168.1. 192.168.2. 127. find this line, remove the line ';' at the beginning, and change the access restriction to hosts allow = 192.168.0. 127 ., specify the intranet IP address and local IP address. only access in these two cases is allowed.
(2) configure the basic attributes of the simplest Access Directory:
[Share] the folder name displayed during viewing on the windows client
Path =/var/samba/share shared directory location. to create a directory that exists in the system, you can configure it before creating it.
Read only = no
Public = yes

5. set permissions for the configured shared directory:
# Mkdir/var/samba/share. if the shared directory just configured does not exist, create
# Chown-R nobody./var/samba/share
# Set the shared directory attribute to 777 in chmod 777/var/samba/share

6. # smbpasswd-a username: add the username (for example) that already exists in the linux system to the Samba user database. enter the username and password when accessing the samba shared directory in windows.
New SMB password: enter the password here
Retype new SMB password: duplicate password

7. # service smb start

Related Article

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.