linux--samba伺服器

來源:互聯網
上載者:User

標籤:資訊服務   設定檔   samba   電腦   linux   


         SMB(Server Messages Block,資訊服務塊)是一種在區域網路上共用檔案和印表機的一種通訊協定,它為區域網路內的不同電腦之間提供檔案及印表機等資源的共用服務。


  1. rpm -qa|grep samba       查看samba 是否已安裝。

  650) this.width=650;" alt="圖片" src="http://b392.photo.store.qq.com/psb?/V10HoZq923s0qn/1vv5Pmkc43aaZzCfs1UdR2Boo81AbuWPsQ5a5A49jwg!/b/dGICqOmHIgAA&bo=ewFtAAAAAAADADI!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:379px;height:109px;" />

 2. service  smb start           啟動smb服務

650) this.width=650;" alt="圖片" src="http://b394.photo.store.qq.com/psb?/V10HoZq923s0qn/mPvox5EBHtyk5P6L32VLVhVr73oGivBvqaY.8434vck!/b/dD5j3.qFIQAA&bo=MwEbAAAAAAADAAw!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:307px;height:27px;" />

 3. vim  /etc/samba/smb.conf     修改smb服務的設定檔。

650) this.width=650;" alt="圖片" src="http://b391.photo.store.qq.com/psb?/V10HoZq923s0qn/0s4EyoGNRzYXu0iOFJdaRlrLWMAyWTRJu1*msRatqpU!/b/dB45HekLFAAA&bo=hwEeAAAAAAADAL0!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:391px;height:30px;" />
 
 4.  如(是不需密碼,全許可權的共用目錄)


650) this.width=650;" alt="圖片" src="http://b394.photo.store.qq.com/psb?/V10HoZq923s0qn/qC6qZgRCvjSU0Lr8hv*wqX1pHUMBGVj3jF0Q07WrRmg!/b/dIk23OqQIQAA&bo=ogGKAAAAAAADAAw!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:418px;height:138px;" />        紅線指  安全等級為不需要使用者和密碼

650) this.width=650;" alt="圖片" src="http://b392.photo.store.qq.com/psb?/V10HoZq923s0qn/DYU.YiAVek1oIAHLLvdFGdIphiwTGhDh5RFBRlziJBg!/b/dISIqemIIgAA&bo=lALAAAAAAAADAHM!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:660px;height:192px;" /> 


 4.1   chmod  777  /201      修改共用目錄許可權。


650) this.width=650;" alt="圖片" src="http://b394.photo.store.qq.com/psb?/V10HoZq923s0qn/ZD3onuCRpenLsN0evkiFw2RWE4koe2ujSltLZ..6U3g!/b/dNlJ3.qYIQAA&bo=ogEzAAAAAAADALU!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:418px;height:51px;" />

 5.  service iptables stop   關閉防火牆
650) this.width=650;" alt="圖片" src="http://b392.photo.store.qq.com/psb?/V10HoZq923s0qn/GM8fXAdJorLB3SS*Q5xjkJNB.TXv6kDx222Mr23jIeM!/b/dJvFsumGIgAA&bo=EwJSAAAAAAADAGY!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:531px;height:82px;" />
  6. service smb restart     重啟服務   
 650) this.width=650;" alt="圖片" src="http://b391.photo.store.qq.com/psb?/V10HoZq923s0qn/OkouopHjItGoje0Wyn0hC0H1nc8xcz783gtKeRNqMGY!/b/dM2aGOnkEwAA&bo=HAI*AAAAAAADAAQ!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;color:rgb(51,51,51);font-family:‘微軟雅黑‘;font-weight:bold;text-indent:28px;width:540px;height:63px;" />
 

7.  在windo下的檔案瀏覽器下測試:輸入       :\\172.16.109.86


650) this.width=650;" alt="圖片" src="http://b392.photo.store.qq.com/psb?/V10HoZq923s0qn/ksK9PwsJ9v3T9GL9Y4rJkvRj760KqRui5TFdPqDjKTI!/b/dHe5sumJIgAA&bo=WwGsAAAAAAADANM!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:347px;height:172px;" />
 


8.若出現如下提示。

650) this.width=650;" alt="圖片" src="http://b394.photo.store.qq.com/psb?/V10HoZq923s0qn/sGUb4s0.zKqTEt7uBTui.abN7FO32RtoZLCHr*rTWaM!/b/dEYs2eqVIQAA&bo=cwKNAAAAAAADANk!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:627px;height:141px;" />


 9. setenforce 0             在linux上用此命令關閉selinux。


650) this.width=650;" alt="圖片" src="http://b391.photo.store.qq.com/psb?/V10HoZq923s0qn/Itix2*ZzoCPxDIdFUHQk8*nEWBSJqjnEaS8Q14*ji2k!/b/dH0xHekZFAAA&bo=FgEpAAAAAAADABs!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:278px;height:41px;" />

 

10.     再次測試,成功即可。


另--------

可以為SMB服務添加口令密碼。

1.修改  /etc/samba/smb.conf    設定檔即可。

2.如。 
650) this.width=650;" alt="圖片" src="http://b394.photo.store.qq.com/psb?/V10HoZq923s0qn/Sa8j5ftYSzd6*Q5BWNe524tdxTcXaTpNEVS2ANJoH.g!/b/dPHU2uqSIQAA&bo=ZgJ6AAAAAAADADs!" style="margin:0px;padding:0px;border-width:0px;border-style:none;vertical-align:top;width:614px;height:122px;" />


本文出自 “心遠,路遠。” 部落格,請務必保留此出處http://yzh123.blog.51cto.com/9014017/1549884

linux--samba伺服器

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.