安裝smb服務(wù)器
發(fā)布日期:2018-05-03 20:50 | 文章來源:網(wǎng)絡(luò)
配置文件服務(wù)器
安裝smb服務(wù)器
root@vm-001~#yum-yinstallsamba
配置samba服務(wù)器
1.備份配置文件
root@vm-001~#cd/etc/samba/root@vm-001samba#lslmhostssmb.confsmbusersroot@vm-001samba#cpsmb.confsmb.conf.bak
2、在配置文件末尾添加如下代碼
root@vm-001samba#tail-4smb.confms#共享文件名稱comment=ms#內(nèi)容描述path=/data/ms#配置訪問路徑writable=yes#可寫權(quán)限vaildusers=ms#授權(quán)用戶,可授權(quán)多個,用“,”隔開
3、添加系統(tǒng)用戶
root@vm-001home#passwdmsChangingpasswordforuserms.Newpassword:Retypenewpassword:passwd:allauthenticationtokensupdatedsuccessfully.
4、創(chuàng)建訪問目錄并授權(quán)
root@vm-001data#lsbackupbinifengsitelogsscriptsoftroot@vm-001data#mkdirmsroot@vm-001data#chown-Rifeng_ms.ifeng_msifeng_ms/root@vm-001data#chmod777ifeng_ms
5、創(chuàng)建samb用戶
root@vm-001data#smbpasswd-amsNewSMBpassword:RetypenewSMBpassword:Addeduserms.
6、重啟samb服務(wù)使配置文件生效
root@vm-001data#/etc/init.d/smbrestartShuttingdownSMBservices:OKStartingSMBservices:
7、關(guān)閉防火墻和selinux
root@vm-001~#/etc/init.d/iptablesstoproot@vm-001~#setenforce0setenforce:SELinuxisdisabledroot@vm-001~#sed-i's/SELINUX=enforcing/SELINUX=disabled/g'/etc/selinux/config
8、客戶端測試
地址欄輸入\\ip\訪問模塊,彈出用戶名密碼框,輸入正確即可看到如下界面。
Tags:配置文件服務(wù)器,安裝smb服務(wù)器
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。
相關(guān)文章