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
Yesterday when I was implementing the function of...
Navigation and other things are often used in dai...
MySql index detailed introduction and correct use...
Table of contents 1. forEach() 2. arr.filter() 3....
1. Two types of DMA mapping 1.1. Consistent DMA m...
Table of contents 1. Global level 2. Database lev...
Install the latest stable version of MySQL on Lin...
Table of contents 1. Introduction to NFS-Ganesha ...
Table of contents 1. Introduction 2. Use 1. @Comp...
Usage of alter command in mysql to edit table str...
MySQL sequence AUTO_INCREMENT detailed explanatio...
I installed it in msi format, mainly to see the m...
1. Hot deployment: It means redeploying the entir...
Table of contents Drop-down multiple-select box U...
1. Documentation Rules 1. Case sensitive. 2. The a...