i need to change nis master server settings on cloned system. don't even ask.
commands:
# domainname <newdomainname>
# mv /var/yp/<domainname> to <newdomainname>
edit:
/etc/hosts change <hostname> to <newhostname> ; <ip> to <newip>
/etc/conf.d/net change <domainname> to <newdomainname>
/etc/yp.conf change <domainname> to <newdomainname>
/etc/ypserv.conf
/etc/ypserv.securenets
/var/yp/ypservers change <hostname> to <newhostname>
make -C /var/yp
test:
# ypwhich
Should return <newhostname>
# ypcat passwd | grep <username>
# ypcat group | grep <groupname>
Both should return known results
Thursday, March 22, 2018
nis master server settings on cloned system
Wednesday, March 7, 2018
put pubkeys on a lot of hosts
i need to zap authorized_keys *all over the place*
this concatenates a file which contains sever id_rsa.pub keys.
nodes is a long list of ip addresses.
#!/bin/bash
for i in `cat nodes` ; do
cat authorized_keys.add | ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no -o \
UserKnownHostsFile=/dev/null -t -t -t -l root $i 'cat >> /root/.ssh/authorized_keys'
done
Subscribe to:
Posts (Atom)