十一、 创建用户student1到student50,指定组为student组
[root@ ~]# for i in $(seq 1 50);do useradd -g student student$i;echo 'RedHat' | passwd --stdin student$i;done
? 为student1和student2这两个用户设置磁盘配额
[root@ student1]# vim /etc/fstab
/dev/VolGroup00/LogVol00 /home ext3 defaults,usrquota 1 2
[root@ student1]# mount -o remount /home
[root@ student1]# quotacheck -mcug /home
[root@ student1]# quotaon /home
[root@ home]# edquota student1
Disk quotas for user student1 (uid 504):
Filesystem blocks soft hard inodes soft hard
/dev/mapper/VG-LV 28 11000 22000 7 0 0
[root@ home]# edquota -p student1 student2
n dd if=/dev/zero of=/home/studentX/filetest bs=1M count=10成功
n dd if=/dev/zero of=/home/studentX/filetest bs=1M count=30失败
十二、 172.16.254.254这个服务器上有用户guest200X,密码为password,nisdomain是notexample
? 要求这个用户可以通过你的机器登录
? 172.16.254.254 通过nfs把/rhome 共享出来了
? guest200X的家目录是server1.example.com:/rhome/guest200X
? guest200X的家目录应该能自动挂载到/home/guests/guest200X
? guest200X的家目录必须要有可写权限
[root@ ~]# setup
Authentication configuration---à[*]Use NIS---à Domain: notexample Server: 192.168.0.254 (按题中要求) ------>OK
[root@ ~]# yptest
[root@ ~]# rpcinfo -p 172.16.100.100 //
[root@ ~]# ypcat passwd
[root@ ~]# vim /etc/auto.master
/home/guests /etc/auto.misc //加入一行
[root@ ~]# vim /etc/auto.misc
Guest200X -fstype=nfs,rw,soft,intr 172.16.100.100:/home/guests/guest200X //加入一行
[root@ ~]# service autofs restart
测试