|
发表于 2005-3-16 12:21:24
|
显示全部楼层
Post by kissingwolf
你做了链接,其实还是挂在/home下的。
为什么会报错,我没有遇到过,从log中说明是在autofs 启动的时候切换用户权限不够,你是用root验证的吗?用root是不可以的,因为nfs默认把root对应nfsnobody。
请把你的分区和挂接表给我!就是你用mount -l 的输出!另外你在做了什么操作后出现的上面提到的log?
[root@hx etc]# cd /etc
[root@hx etc]# cat auto.master
/home /etc/auto.home --timeout=60
[root@hx etc]# cat auto.home
* -rw,soft,initr 10.10.70.18:/home/&
[root@hx etc]# service autofs restart
Stopping automount:[ OK ]
Starting automount:[ OK ]
[root@hx etc]# fdisk -l
Disk /dev/sda: 6442 MB, 6442450944 bytes
255 heads, 63 sectors/track, 783 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 783 6185025 8e Linux LVM
[root@hx etc]# cat fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/vg/root / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
/dev/vg/home /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/vg/tmp /tmp ext3 defaults 1 2
/dev/vg/usr /usr ext3 defaults 1 2
/dev/vg/var /var ext3 defaults 1 2
/dev/vg/swap swap swap defaults 0 0
/dev/hdc /media/cdrom auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,fscontext=system_ubject_r:removable_t,exec,noauto,managed 0 0
[root@hx etc]# mount -l
/dev/mapper/vg-root on / type ext3 (rw) []
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw) [/boot]
none on /dev/shm type tmpfs (rw)
/dev/mapper/vg-home on /home type ext3 (rw) []
/dev/mapper/vg-tmp on /tmp type ext3 (rw) []
/dev/mapper/vg-usr on /usr type ext3 (rw) []
/dev/mapper/vg-var on /var type ext3 (rw) []
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
[root@hx etc]# >/var/log/messages
[root@hx etc]# su - e1
su: warning: cannot change directory to /home/e1: No such file or directory
-bash-3.00$ exit
logout
[root@hx etc]# cat /var/log/messages
Feb 26 04:59:59 hx su(pam_unix)[3048]: session opened for user e1 by root(uid=0)
Feb 26 04:59:59 hx su[3048]: Warning! Could not relabel /dev/pts/0 with user_ubject_r:devpts_t, not relabeling.Operation not permitted
Feb 26 05:00:01 hx su(pam_unix)[3048]: session closed for user e1
[root@hx etc]# mount -l
/dev/mapper/vg-root on / type ext3 (rw) []
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda1 on /boot type ext3 (rw) [/boot]
none on /dev/shm type tmpfs (rw)
/dev/mapper/vg-home on /home type ext3 (rw) []
/dev/mapper/vg-tmp on /tmp type ext3 (rw) []
/dev/mapper/vg-usr on /usr type ext3 (rw) []
/dev/mapper/vg-var on /var type ext3 (rw) []
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
e1是NIS服务器上的用户,不是hx上的。我的系统是rhel4 |
|