六、Samba 服務器配置

一、安裝samba服務測試

  1. [root@rhel6_80 samba]# yum -y install samba #安裝samba
  2. [root@rhel6_80 samba]# rpm -qa |grep samba #查看是否已安裝 samba-winbind-clients-3.6.9-164.el6.x86_64 samba4-libs-4.0.0-58.el6.rc4.x86_64 samba-winbind-3.6.9-164.el6.x86_64 samba-3.6.9-164.el6.x86_64 samba-client-3.6.9-164.el6.x86_64 samba-common-3.6.9-164.el6.x86_64
 
二、設置samba服務開機自啓
  1. [root@rhel6_80 samba]# service smb start
  2. 啓動 SMB 服務:
  3. [root@rhel6_80 samba]# chkconfig smb on
  4. [root@rhel6_80 samba]# chkconfig --list smb
  5. smb 0:關閉1:關閉2:啓用3:啓用4:啓用5:啓用6:關閉
 
三、客戶端簡單測試鏈接
  1. [root@rhel6_84 ~]# smbclient -L 192.168.3.80
  2. Enter root's password:
  3. Anonymous login successful
  4. Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-164.el6]
  5. Sharename Type Comment
  6. --------- ---- -------
  7. IPC$ IPC IPC Service (Samba Server Version 3.6.9-164.el6)
  8. Anonymous login successful
  9. Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9-164.el6]
  10. Server Comment
  11. --------- -------
  12. Workgroup Master
  13. --------- -------
 
四、配置文件
  1. [printers] #共享名
  2. comment =AllPrinters #描述
  3. path =/var/spool/samba #共享目錄或文件絕對路徑
  4. browseable = no #是否容許查看此共享內容,
  5. guest ok = no
  6. writable = no
  7. printable = yes
  8. public = yes #是否容許匿名訪問
  9. valid users = 用戶名或@組名 #誰能訪問此共享
  10. readonly = yes #是否只能讀取,no標示能夠讀寫
  11. writble = yes #容許寫入,no標示不能寫入,只讀
  12. write list = 用戶名或@組名 #標示有寫入權限的用戶或組
相關文章
相關標籤/搜索