Tutorial on building file sharing service Samba under CentOS6.5

Tutorial on building file sharing service Samba under CentOS6.5

Samba Services:

This content is for reference of samba service learners

Case description:

The administrator of a company needs to build a SAMBA server and customize the IP address and allowed access network segments. The security level of the SAMBA server is user level, and the workgroup it belongs to is WORKGROUP, so that added users can access their personal directories and shared directories /smb_share, and can read, write, and execute the directories.

1. Working principle of SMB protocol and SAMBA server

SAMBA supports SSL for secure communication and LDAP for directory service-based identity authentication. The SAMBA server can also act as a PDC and member server in a Windows domain, and can manage Windows computers and Linux workstations on a Linux server.

SMB is a client/server-based protocol, so a SAMBA server can act as both a file sharing server and a SAMBA client. That is, a Windows client can access shared resources on a SAMBA server set up under Linux through the SMB protocol. At the same time, the SAMBA server can also access resources shared by other Windows systems or Linux systems in the network.

2. Configuration files and configuration items of SAMBA service

Configuration file: /etc/samba/smb.conf

Configuration item: Network Related Options Share Definitions

3. Environment

CentOS 6.5 operating system/VMware software (server side), Windows operating system (client side)

4. The specific steps are as follows

1. Check the samba server: rpm -q samba

2. Turn off the firewall: service iptables stop

3. Load the virtual disc: Virtual Machine -> Removable Devices -> CD/DVD -> Connect

4. Modify the yum (download) file: /etc/yum.repos.d/CentOS-Media.repo

5. Mount the CD: mount –t iso9660 /dev/sr0 /mnt

6. Install the samba server: yum install -y samba

7. Check whether samba is installed successfully rpm -q samba (rpm-qa | grep samba)

8. Modify the samba configuration file: /etc/samba/smb.conf

9. Add a shared folder: mkdir /mydoc, modify the smb.conf file again: vim /etc/samba/smb.conf

10. Add a samba working group: groupadd smbusers

11. Add a samba user (this user cannot log in to the server system): useradd –g smbusers –s /sbin/nologin smbuser1

12. Set the samba user password: smbpasswd –a smbuser1

13. Set permissions for the mydoc shared folder you just set up:

chown –R smbuser1:smbusers /mydoc

chmod –R 777 /mydoc

14. Check the directory permissions: as shown below:

15. Turn off SELINUX enforcement mode: setenforce 0

Or vi /etc/sysconfig/selinux and change SElinux = enforcing to SElinux = disabled

16. Restart the service: service smb restart service nmb restart

17. Connect to samba server: win+R enter \\ ip address

18. View folder:

5. Experience

1. When logging into a shared folder, try several times due to network problems.

2. The shared folder permissions must be set correctly. Use the command (ll -a) to view the folder's access users and groups, as well as its permissions:

drwxrwxrwx. 2 smbuser1 smbusers 4096 Apr 22 03:49 mydoc

Summarize

The above is the tutorial on how to build a file sharing service Samba under CentOS6.5. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Complete steps to build NFS file sharing storage service in CentOS 7
  • How to set up NFS file sharing in CentOS 6.8
  • How to set up folder sharing in CentOS 7 in VMware
  • VirtualBox installation enhancements in CentOS 7 (shared folders)
  • Detailed explanation of the mount command in Centos to mount the windows7 shared directory
  • VMware12 and CentOS7 shared folder problem analysis
  • A brief analysis of how to build a samba server on Centos7
  • How to install samba file server on Centos

<<:  Summary of the difference between using from and join to query two tables in MySQL

>>:  A brief discussion on React native APP updates

Recommend

N ways to align the last row of lists in CSS flex layout to the left (summary)

I would like to quote an article by Zhang Xinxu a...

Minimalistic website design examples

Web Application Class 1. DownForEveryoneOrJustMe ...

React-Native environment setup and basic introduction

Environment Preparation 1. Environment Constructi...

Solve the MySQL login 1045 problem under centos

Since the entire application needs to be deployed...

Detailed tutorial on installing and configuring MySQL 5.7.20 under Centos7

1. Download the MySQL 5.7 installation package fr...

How to uninstall MySQL 8.0 version under Linux

1. Shut down MySQL [root@localhost /]# service my...

MySQL full-text search usage examples

Table of contents 1. Environmental Preparation 2....

JavaScript web page entry-level development detailed explanation

Part 3: ❤Three ways to overlook backend data rece...

How to query whether the mysql table is locked

Specific method: (Recommended tutorial: MySQL dat...

Using front-end HTML+CSS+JS to develop a simple TODOLIST function (notepad)

Table of contents 1. Brief Introduction 2. Run sc...

Detailed explanation of MySQL covering index

concept If the index contains all the data that m...

A brief analysis of how to upgrade PHP 5.4 to 5.6 in CentOS 7

1. Check the PHP version after entering the termi...

Optimize the storage efficiency of BLOB and TEXT columns in InnoDB tables

First, let's introduce a few key points about...

The actual process of implementing the guessing number game in WeChat applet

Table of contents Function Introduction Rendering...

npm Taobao mirror modification explanation

1. Top-level usage 1. Install cnpm npm i -g cnpm ...