1、安装samba
yum install samba samba-common samba-client -y
2、修改配置文件
[[email protected] /tmp] Nginx Proxy
#cat /etc/samba/smb.conf
[global]
min protocol=NT1
max protocol=SMB3
workgroup=WORKGROUP
server string = ShunX
netbios name = ShunXsmb
# log file = /var/log/samba/log.%m
# security = share
security = user
map to guest = Bad User
winbind enum users=yes
load printers=yes
printcap name=cups
printing=cups
[public]
comment = Public Stuff
path = /data1/xunlei/
public = yes
writeable = yes
browseable = yes
guest ok = yes
3、启动服务
systemctl enable nmb smb
systemctl restart nmb smb
4、检查服务状态
[[email protected] /etc/samba] Nginx Proxy
#smbclient -L 127.0.0.1
Enter WORKGROUP\root's password:
Sharename Type Comment
--------- ---- -------
public Disk Public Stuff
IPC$ IPC IPC Service (ShunX)
Reconnecting with SMB1 for workgroup listing.
Server Comment
--------- -------
Workgroup Master
--------- -------
WORKGROUP
[[email protected] /tmp] Nginx Proxy
#smbstatus
Samba version 4.10.16
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
2201 nobody nobody 10.0.0.109 (ipv4:10.0.0.109:59262) SMB2_10 - -
3471 nobody nobody 10.0.0.109 (ipv4:10.0.0.109:59477) SMB2_10 - -
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
public 3471 10.0.0.109 四 1月 20 14时26分15秒 2022 CST - -
public 2201 10.0.0.109 四 1月 20 11时28分53秒 2022 CST - -
Locked files:
Pid User(ID) DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
2201 99 DENY_NONE 0x100081 RDONLY NONE /data1/xunlei 开端 Thu Jan 20 11:28:54 2022
3471 99 DENY_NONE 0x100081 RDONLY NONE /data1/xunlei . Thu Jan 20 14:26:15 2022