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: 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! You may also be interested in:
|
<<: Summary of the difference between using from and join to query two tables in MySQL
>>: A brief discussion on React native APP updates
I would like to quote an article by Zhang Xinxu a...
Web Application Class 1. DownForEveryoneOrJustMe ...
Environment Preparation 1. Environment Constructi...
Since the entire application needs to be deployed...
1. Download the MySQL 5.7 installation package fr...
1. Shut down MySQL [root@localhost /]# service my...
Table of contents 1. Environmental Preparation 2....
Part 3: ❤Three ways to overlook backend data rece...
Specific method: (Recommended tutorial: MySQL dat...
Table of contents 1. Brief Introduction 2. Run sc...
concept If the index contains all the data that m...
1. Check the PHP version after entering the termi...
First, let's introduce a few key points about...
Table of contents Function Introduction Rendering...
1. Top-level usage 1. Install cnpm npm i -g cnpm ...