slurm_config/nis.client.sh
2024-12-17 14:40:01 +08:00

29 lines
850 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
echo sudo cp ~/config/nis/defaultdomain /etc/defaultdomain
sudo cp ~/config/nis/defaultdomain /etc/defaultdomain
# 编辑/etc/default/nis将NISCLIENT=false改为true
echo sudo cp ~/config/nis/nis.client /etc/default/nis
sudo cp ~/config/nis/nis.client /etc/default/nis
# 编辑/etc/yp.conf指定nis服务器
echo sudo cp ~/config/nis/yp.conf /etc/yp.conf
sudo cp ~/config/nis/yp.conf /etc/yp.conf
# 编辑/etc/nsswitch.conf注释原有的passwd、shadow、group增加以下内容
echo sudo cp ~/config/nis/nsswitch.conf /etc/nsswitch.conf
sudo cp ~/config/nis/nsswitch.conf /etc/nsswitch.conf
sudo systemctl stop ypbind
echo sudo systemctl start ypbind
sudo systemctl start ypbind
echo sudo systemctl enable ypbind
sudo systemctl enable ypbind
sleep 3
echo sudo systemctl status ypbind
sudo systemctl status ypbind