RHCE 6.0 集训试题+答案(3)
日期:2011-11-04
点击:133
来源: 未知
分享至:
/etc/hosts.allow /etc/hosts.deny有明确接受先接受,没有明确接受有明确拒绝就拒绝,没有明确接受明确拒绝则接受
配置samba,要求如下:
1、共享/mnt/storage目录,共享名为share
2、仅允许user1,user2用户对该目录有写权限,其他用户只读,密码为redhat
3、仅允许用户在example.com域可以访问该共享
4、允许所有人浏览,拒绝匿名用户访问。
yum -y install samba
Service smb restart ;service nmb restart ; chkconfig smb on; chkconfig nmb on;
chcon -t samba_share_t /mnt/storage
getsebool -a | grep samba
setsebool -P samba_domain_controller=1
setsebool -P samba_export_all_ro=1
setsebool -P samba_enable_home_dirs=1
添加samba用户:首先必须是一个本地用户: sampasswd -a user1 ;
Netbios name = RHCE
[share]
comment = Public Stuff
path = /mnt/storage
public = no
writable = yes
write list =user1,user2
browseable = yes
在/etc/hosts.deny中添加: samba: ALL EXCEPT .example.com
测试:smbclient -L //192.168.0.116; mount -t cifs 192.168.0.116:/share /samba -o username=user1
配置FTP服务器
1、建立ftp server 允许匿名用户可以上传,
2、将所有用户都锁定在自己的家目录
3、仅允许example.com域用户访问该FTP
yum -y install vsftpd
service vsftpd restart
chkconfig vsftpd on
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史