Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Build samba service in linux redhat6.5

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Samba is a free software that implements SMB protocol on Linux and UNIX systems. It consists of server and client programs. SMB (Server Messages Block) is a communication protocol for sharing files and printers on a local area network. It provides sharing services such as files and printers among different computers in a local area network. SMB protocol is a client/server protocol through which clients can access shared file systems, printers, and other resources on servers. By setting "NetBIOS over TCP/IP" Samba can share resources not only with local network hosts, but also with computers around the world.

Here's how to set up a samba server in linux redhat 6.5

Installation package required: samba1: installation rpm -ivh/mnt/Packages/samba-3.6.9 - 164.el6.x86_64.rpm//Install samba packages rpm -qc samba //View software path cd /etc/samba/ //go to samba directory mv smb.conf smb.conf.bak //put smb.conf Move renamed smb.conf.bak grep -v "#" smb.conf.bak > smb.conf //filter out #in smb.con.bak file and save as smb.conf vi smb.conf //edit smb.conf

2: security = share Authentication of anonymous users [share] path=/opt/abc //path public=yes //Public shared files browseable=yes //be able to access writable=yes //can write create mask=0644 directory mask=0755 //Subfile permissions

3: mkdir /opt/abc //create abc in opt directory chmod 777 /opt/abc //modify abc directory permissions service iptables stop //Close firewall setenforce 0 service smb start //start smb service

4: Search for\\192.168.100.111 on windows to access samba shared services Go to Create a File Go back to linux /opt/abc to see this file

5: Set authentication login vim /etc/samba/smb.confsecurity = user below for samba authentication [zkc]path=/opt/zkc //file save path browseable=yes //able to access create mask=0644 directory mask=0755 //subfile permissions valid users=zzz, kkk zzz kkk Users can visit write list=zzz zzz can write

6:useradd zzz //Create zzz user useradd kkk smbpasswd -a zzz //set samba login password smbpasswd -a kkk pdbedit -L //view samba users mkdir /opt/zkc //opt Create zkc directory below chmod 777 /opt/zkc/ //modify zkc directory permissions

7: restart smb service Clean windows cache

8: now open samba again will pop up login window type zzz Password 123456 OK Enter Samba Share File

9: Samba account mapping virtual account login cd /etc/samba/ //to etc/samba ls //View vi smbusers //Edit smbusers zzz = z01 z02 //zzz User equals z01 z02

10:vi smb.conf //edit smb.confusername map = /etc/samba/smbusers //add definition path

11: log in using z01 is to enter zzz user to enter smb share file Create a z01.txt Then go to Linux. View File Owner You can see that zzz created it.

12: How to configure denial of access to smb service vi /etc/samba/smb.conf //edit smb.conf hosts deny=192.168.100. 10.0.0. //Access Control List (Access Denied)

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report