LINUX samba配置共享文件目錄
1.使用rpm -qa|grep samba 查看是否安裝samba
samba-winbind-clients-3.5.4-68.el6.x86_64
samba-3.5.4-68.el6.x86_64
samba-client-3.5.4-68.el6.x86_64
samba-common-3.5.4-68.el6.x86_64
已安裝
2.更改/etc/samba/smb.conf配置
- [global]
- dos charset = cp936
- display charset = UTF-8
- workgroup = MYGROUP
- server string = Samba Server Version %v
- log file = /var/log/samba/log.%m
- max log size = 50
- cups options = raw
- [homes]
- comment = Home Directories
- read only = No
- browseable = No
- [printers]
- comment = All Printers
- path = /var/spool/samba
- printable = Yes
- browseable = No
- [tools]
- comment = tools
- path = /tools
- read only = No
- guest ok = Yes
- [home]
- comment = User Directory
- path = /home/%U
- read only = No
[global] dos charset = cp936 display charset = UTF-8 workgroup = MYGROUP server string = Samba Server Version %v log file = /var/log/samba/log.%m max log size = 50 cups options = raw [homes] comment = Home Directories read only = No browseable = No [printers] comment = All Printers path = /var/spool/samba printable = Yes browseable = No [tools] comment = tools path = /tools read only = No guest ok = Yes [home] comment = User Directory path = /home/%U read only = No
添加smb訪問用戶smbpasswd -a root
3.重啟service smb restart
4.如果windows下登錄samba服務器后無法訪問linux下共享目錄,提示沒有權限。
則檢查
a、確保linux下防火牆關閉或者是開放共享目錄權限
b、確保samba服務器配置文件smb.conf設置沒有問題,可網上查閱資料看配置辦法
c、確保setlinux關閉,可以用setenforce 0命令執行。 默認的,SELinux禁止網絡上對Samba服務器上的共享目錄進行寫操作,即使你在smb.conf中允許了這項操作。 /usr/bin/setenforce 修改SELinux的實時運行模式
setenforce 1 設置SELinux 成為enforcing模式
setenforce 0 設置SELinux 成為permissive模式
如果要徹底禁用SELinux 需要在/etc/sysconfig/selinux中設置參數selinux=0 ,或者在/etc/grub.conf中添加這個參數
/usr/bin/setstatus -v
AnyConnect使用說明(電腦版Windows):
http://www.cnblogs.com/fklin/p/8652072.html

