CentOS下的samba配置
在centos下开启samba的时候一定要把iptables,及SELINUX 两项全部关掉才可以。我在centos下使用的时候,在网上找了好多的资料看有关配置samba的文章,但是都是打通小异,能看到linux下的共享文件,但就是没有"写权限",为此我郁闷了好长时间,就是不知道原因,但在我的一次重装机器后,我的师傅和我一起检查了samba的配置,但samba就这么点东西,没有什么。
特别的东东,就是不能写气死我了。最后发现把SELINUX的功能关掉就好了,哎郁闷啊!
SELINUX也是在centos(RADHAT其他版本没有使用过,不做评论)下的关于安全的机制,故此关掉就好了。
#======================= Global Settings =====================================
[global]
dos charset = GB2312
unix charset = GB2312
display charset = GB2312
# ----------------------- Netwrok Related Options -------------------------
workgroup = MYGROUP
server string = Samba Server1(freesense)
netbios name = Centos5-Samba1
hosts allow = 127. 192.168.1.
# --------------------------- Logging Options -----------------------------
log file = /var/log/samba/%m.log
max log size = 50
# ----------------------- Standalone Server Options ------------------------
security = user
encrypt passwords = Yes
smb passwd file = /etc/samba/smbpasswd
# passdb backend = tdbsam
# --------------------------- Filesystem Options ---------------------------
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no
template shell = /bin/false
winbind use default domain = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
; valid users = MYDOMAIN\%S
;[printers]
; comment = All Printers
; path = /var/spool/samba
; browseable = no
; guest ok = no
; writable = no
; printable = yes
###############################################