5、systemctl enabled smb.service // 設定開機自啟
6、 ss -antp | grep smb // 驗證,檢視埠 139,445是否已啟動
7、[root@node0 ~]# smbpasswd -a martin
new smb password:*****
retype new smb password:*****
added user martin.
// 設定共享使用者, -a(apend)附加
8、[root@node0 ~]# pdbedit -l
martin:1001:
// 檢視共享使用者
客戶端:
1、yum install -y samba-client
2、vi /etc/selinux/config // 將selinux=enforcing改為selinux=disabled
3、getenforce -->enforcing
setenfoce 0
getenforce -->permissive
4、 firewall-cmd --state // 檢視防火牆狀態
systemctl stop firewalld.service // 停止firewall
systemctl disable firewalld.service // 禁止firewall開機啟動
上傳許可權:
1、vim /etc/samba/smb.conf
writbalbe = yes
2、[root@node0 ~]# ls -ldh /home/shared
drwxr-xr-x. 2 root root 100 dec 21 00:57 /home/shared
[root@node0 ~]#
[root@node0 ~]# setfacl -m u:martin:rwx /home/shared
// 修改使用者martin對檔案的許可權
3、[root@node0 ~]# ls -l /home/shared
total 0
-rw-r–r--. 1 root root 0 dec 21 00:57 1.txt
-rw-r–r--. 1 root root 0 dec 21 00:57 2.txt
-rw-r–r--. 1 root root 0 dec 21 00:57 3.txt
-rw-r–r--. 1 root root 0 dec 21 00:57 4.txt
-rw-r–r--. 1 root root 0 dec 21 00:57 5.txt
-rw-r–r--. 1 root root 0 dec 21 00:57 6.txt
-rw-r–r--. 1 root root 0 dec 21 00:53 test.txt
-rwxr–r--. 1 martin martin 0 dec 21 01:52 新建文字文件.txt
samba共享檔案
samba共享檔案 3 4 1,setup 配置linux網路,和主機網路相同,etc init.d network restart 網絡卡重啟後能夠ping通 2,新建系統使用者並設定密碼mxb useradd mxb passwd mxb 3,vi etc samba smb.conf 配置sa...
Samba檔案共享
samba是一種在linux環境中執行的免費軟體 建立基於windows共享 通過外掛程式也可以讓linux使用者共享 server message block 可以為區域網中的不同計算機提供檔案及列印服務等資源的共享 資訊服務快 在區域網中共享檔案 和印表機的一種通訊協議 c s netbios ...
Linux檔案共享samba
samba可以實現windows和linux之間的檔案共享相互訪問 安裝samba yum install samba samba client samba common 主配置檔案在 etc samba smb.conf 會自動安裝服務指令碼 etc rc.d init.d smb 一 linux...