Samba with SELinux

Just bought a new notebook - HP6515d, great machine, with AMD 64bit CPU. Well, it's good to run a 64bit OS with my new machine, and 32bit Windows as VM guest.

Cause my Windows XP is running as VM guest, and I don't like to dedicate a whole partition for the guest OS storage, then Samba is the only option.Just simply config the Samba as following:

[global]
        workgroup 
= xxx
        server 
string = xxx
        log level 
= 1
        max log size 
= 1000
        socket options 
= TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        wins support 
= Yes

[homes]
        comment 
= Home directories
        browseable 
= Yes
        valid users 
= %S
        writable 
= yes

[share]
        comment 
= Public shares
        path 
= /tmp
        force user 
= nobody
        force group 
= users
        read only 
= No
        create mask 
= 0777
        directory mask 
= 0777
        guest ok 
= Yes

After startup the Samba daemon, my Windows XP can access the storage provided by my host machine. But stange tings happened. I can't log into my own home directory!

I've checked through all the privileges related settings, such as user group, rights, and everything seems fine.

After a deeper dig into the problem, found that the problem is caused by the SELinux.

OK, a little googleing on this issue, I found this:

setsebool -P smbd_disable_trans 1

This will disable the SELinux support for samba, and after apply this hack, everything works fine now. This may not be the best solution. One of the thread points out the best practice, but it's involved a lot more work to do.

Fine, I'm quite happy with the config right now. I might try the best solution while I have the time. Let's look forward about this:)

posted on 2008-06-07 19:00 毒菇求Buy 阅读(642) 评论(0)  编辑 收藏 引用 所属分类: LinuxWindows

只有注册用户登录后才能发表评论。
<2008年6月>
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345

导航

统计

常用链接

留言簿(7)

随笔分类(133)

随笔档案(111)

文章分类(65)

文章档案(53)

相册

收藏夹(30)

BLOG

Book store

Graphics Design

搜索

最新评论

阅读排行榜

评论排行榜