跳至主要内容

selinux-samba

samba_selinux(8)      Samba Selinux Policy documentation      samba_selinux(8)

NAME
       samba_selinux - Security Enhanced Linux Policy for Samba

DESCRIPTION
       Security-Enhanced Linux secures the Samba server via flexible mandatory
       access control.

FILE_CONTEXTS
       SELinux requires files to have an extended attribute to define the file
       type.   Policy  governs the access daemons have to these files.  If you
       want to share files other than home directories, those  files  must  be
       labeled samba_share_t.  So if you created a special directory /var/eng,
       you would need to label the directory with the chcon tool.

       chcon -t samba_share_t /var/eng

       To make this change permanent (survive a  relabel),  use  the  semanage
       command to add the change to file context configuration:

       semanage fcontext -a -t samba_share_t "/var/eng(/.*)?"
       This  command  adds the following entry to /etc/selinux/POLICYTYPE/contexts/files/file_contexts.local:

       /var/eng(/.*)? system_u:object_r:samba_share_t:s0

       Run the restorecon command to apply the changes:

       restorecon -R -v /var/eng/

SHARING FILES
       If you want to share files with multiple domains (Apache,  FTP,  rsync,
       Samba),  you can set a file context of public_content_t and public_con‐
       tent_rw_t.  These context allow any of the above domains  to  read  the
       content.   If  you want a particular domain to write to the public_con‐
       tent_rw_t   domain,   you   must   set   the    appropriate    boolean.
       allow_DOMAIN_anon_write.  So for samba you would execute:

       setsebool -P allow_smbd_anon_write=1

BOOLEANS
       SELinux  policy  is customizable based on least access required.  So by
       default SELinux policy turns off SELinux sharing  of  home  directories
       and the use of Samba shares from a remote machine as a home directory.

       If  you are setting up this machine as a Samba server and wish to share
       the home directories, you need to set the samba_enable_home_dirs  bool‐
       ean.

              setsebool -P samba_enable_home_dirs 1

       If  you  want  to use a remote Samba server for the home directories on
       this machine, you must set the use_samba_home_dirs boolean.

              setsebool -P use_samba_home_dirs 1

       system-config-selinux is a GUI tool available to customize SELinux pol‐
       icy settings.

AUTHOR
       This manual page was written by Dan Walsh <dwalsh@redhat.com>.

SEE ALSO
       selinux(8), samba(7), chcon(1), setsebool(8), semanage(8)

dwalsh@redhat.com                 22 Nov 2011                 samba_selinux(8)

评论

此博客中的热门博文

debian 禁用笔记本盒盖休眠功能

编辑 Login Manager 的配置文件( logind.conf )。 打开终端,运行下面的命令打开 logind.conf 文件。 sudo vi /etc/systemd/logind.conf 打开文件后修改下面这行: #HandleLidSwitch=suspend 改成这样: HandleLidSwitch=ignore 保存文件,重启 Login Manager 服务: sudo restart systemd-logind 工作完成!

linux 禁止控制台黑屏和休眠

通过GRUB的引导参数设置: consoleblank=0 控制台多长时间无操作后黑屏,默认值是600秒,设为0表示禁止黑屏。 no_console_suspend 永远也不要将控制台进入休眠状态。因为当控制台进入休眠之后,所有内核的消息就都看不见了(包括串口与VGA)。开启此参数有助于调试系统在休眠/唤醒中发生的故障。

obfsproxy 混淆代理

1、安装2.7以上版本python 2、pip install obfsproxy 如果顺利的话,自动安装完成。 如果失败可以在Pypi官网手动下载包,解压后运行:setup.py install 3、执行服务端命令 setsid obfsproxy --data-dir ~/.obfs/ scramblesuit --dest 127.0.0.1:8388 --password 密码 server 0.0.0.0:443 > ~/.obfs/log 2>&1 & 注:密码由32位的大写字母和数字组成 4、客户端运行 obfsproxy scramblesuit --dest X.X.X.X:443 --password 密码 client 127.0.0.1:8443 混淆代理完成。