- yum install nfs-utils -y
- yum install rpcbind
- showmount -e 192.168.0.254 显示NFS共享的服务
- mount 192.168.0.254:/var/ftp/pub /share挂载到本地
- umount /share
- 2.yum install cifs-utils -y
- yum install samba-client -y
- mount //i/pub /share/ -o user=guest2018
- 开机自动挂载
- vi /etc/fstab
- 192.168.0.254:/var/ftp/pub /share nfs defaults 0 0
- //192.168.0.254/pub /test cifs user=guest2017,password=password 0 0
- mount -a 验证
- yum install autofs -y
- /etc/init.d/autofs start
- cd /net/192.168.0.254
- 按需挂载
- cat /etc/auto.master
- /misc /etc/auto.misc
- /share /etc/auto.share先定义父级目录 /share
- cat /etc/auto.share
- ftp -ro 192.168.0.254:/var/ftp/pub 再定义子目录 /share/ftp
- /etc/init.d/autofs reload
- cd /share/ftp就会出现/var/ftp/pub的内容,5分钟不用就不见来
- -G为附加组 -g为主要组 -s /bin/nologin -m
- userdel -r删除家目录
- echo hehe | passwd --stdin test 给test改密码
- passwd -u解锁 -l枷锁