現 yellow の /etc/shadow, /etc/passwd, /etc/group, /etc/sudoers を www にバックアップする.
# scp /etc/shadow hoge@orange.ep.sci.hokudai.ac.jp:shadow_bk
パーミッションを変えて見れないようにする.
$ chmod 700 shadow_bk
$ sudo halt
/etc/hosts において
133.87.45.70 yellow.ep.sci.hokudai.ac.jp yellow
/etc/hostname において
yellow
/etc/motd において
Linux yellow 2.6.26-2-686 #1 SMP Wed Aug 19 06:06:52 UTC 2009 i686
/etc/mailname において
yellow.ep.sci.hokudai.ac.jp
/etc/exim4/update-exim4.conf.conf において
dc_other_hostnames='yellow.ep.sci.hokudai.ac.jp'
と編集.
新 yellow のグローバル IP アドレスを 133.87.45.70 に設定
/etc/network/interfaces を
iface eth0 inet static address 133.87.45.70 netmask 255.255.255.0 network 133.87.45.0 broadcast 133.87.45.255 gateway 133.87.45.1 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 133.87.45.70 133.87.45.66 133.87.1.11 dns-search ep.sci.hokudai.ac.jp
と編集.
# hostname --file /etc/hostname
# /etc/init.d/networking restart
# /etc/init.d/syslog-ng restart
www サーバで gate ユーザが作業を行う.
すでにある公開鍵を削除する.
~gate/.ssh/known_hosts 中の yellow の行を削除
新たに公開鍵を取得する.
$ ssh yellow.ep.sci.hokudai.ac.jp
公開鍵を作りますかと聞かれ yes を入力.
orange の /etc/gate.conf の %DB_SHARE_HOSTS に yellow が書き込まれているか確認.
yellow から www にログイン.
$ ssh orange.ep.sci.hokudai.ac.jp $ telnet localhost 8888
blue にて
$ ps aux | grep gate
なにやら gate がまだ動いている模様.
$ ls -lt /home/gate/userdb/
1 つもファイルがない.
-> 転送がまだ完了していない!
www で
$ ps aux | grep gate
rsync が動いている.
yellow ではすこしずつファイルが増えている.
-> 転送にものすごく時間がかかっている.
yellow で dmesg を見てみると
eth0 link down eth0 link up
がひたすら繰り返されている.
-> ネットワークカードの不調?
ネットワークの口を変えてやり直してみる.
/etc/network/interfaces の eth0 を eth1 に変更.
# /etc/init.d/networking restart
eth1 が立ち上がらないので OS を再起動. -> 立ち上がった.
今度は dmesg にエラーは出ていない模様.
もう一度
$ ssh hoge@orange.ep.sci.hokudai.ac.jp $ telnet localhost 8888
今度は一瞬で転送されたようだ.
/home/gate/userdb, /home/gate/ipdb などにファイルができ, 各ユーザの home ディレクトリができた.
host -l ep.sci.hokudai.ac.jp
動いている.
新しくできた /etc/passwd, /etc/shadow, /etc/group, /etc/sudoers の人名の行(gate より下)を, バックアップしておいたファイルで置き換える.
mondo 以外でログインしてみる.
-> ログインできた.
/ETC, /HOME を削除
# rm -r /ETC /HOME
mondo ユーザを削除
# deluser --remove-home mondo1 # deluser --remove-home mondo5
gate 登録更新
テプラの貼り換え