Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1173115
  • 博文数量: 128
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 4870
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-19 14:28
文章分类

全部博文(128)

文章存档

2010年(2)

2009年(22)

2008年(104)

我的朋友

分类: LINUX

2009-03-06 13:07:16

rhel5中基于SElinux的autofs配置
 
两台主机:rhel5和server5.
rhel5中使用nfs共享/home,server5作为客户端自动挂载。
在server5上编辑/etc/auto.misc文件,增加一下行:
[root@server5 misc]# vi /etc/auto.misc
#
# $Id: auto.misc,v 1.2 2003/09/29 08:22:35 raven Exp $
#
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd              -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
# the following entries are samples to pique your imagination
#linux          -ro,soft,intr          

#boot           -fstype=ext2            :/dev/hda1
#floppy         -fstype=auto            :/dev/fd0
#floppy         -fstype=ext2            :/dev/fd0
#e2floppy       -fstype=ext2            :/dev/fd0
#jaz            -fstype=ext2            :/dev/sdc1
#removable      -fstype=ext2            :/dev/hdd
rhel5           -ro,soft,intr           rhel5:/home
这样设置完了后,挂载会不成功的。原因是selinux在搞怪,解决办法如下:
在rhel5主机上使用一下命令,解除selinux对autofs的限制:
[root@server5 misc]#setsebool -P automount_disable_trans on
阅读(1341) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~