Go to TOP Page
Google:


□なんのログ?


○ssh のログイン記録でつ。

/var/log に空っぽの authlog が存在しているだけで普段は、 何も書き込まれていないこのファイル。なんの為に存在しているのか 疑問を感じた方も多いのでわ?
authlog ってファイル名から察するに、

認証モノ?

とお感じになられた方々も多いハヅ。
このファイル、 ssh でログインしようとしてきたユーザの履歴と接続元 などが記載される重要な log なのでつ。
syslog 経由で update されますが、 /etc/syslog.conf で authlog の エントリ部分がコメントアウトされていてデフォでは何も書き込まれません。
なので、それをきちんと書き出して貰うようにしましょうとゆぅものでつ。


□/etc/syslog.conf を編集


○コメントアウトするだけ。

まずわ、root になってもらっておいて、

で、 syslog.conf を開いてもらって・・・・


Solaris10 の /etc/syslog.conf
#ident "@(#)syslog.conf 1.5 98/12/14 SMI" /* SunOS 5.0 */
#
# Copyright (c) 1991-1998 by Sun Microsystems, Inc.
# All rights reserved.
#
# syslog configuration file.
#
# This file is processed by m4 so be careful to quote (`') names
# that match m4 reserved words. Also, within ifdef's, arguments
# containing commas must be quoted.
#
*.err;kern.notice;auth.notice /dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit /var/adm/messages

*.alert;kern.err;daemon.err operator
*.alert root

*.emerg *

# if a non-loghost machine chooses to have authentication messages
# sent to the loghost machine, un-comment out the following line:
#auth.notice ifdef(`LOGHOST', /var/log/authlog, @loghost)
↑ここのコメントを削除
mail.debug ifdef(`LOGHOST', /var/log/syslog, @loghost)

#
# non-loghost machines will use the following lines to cause "user"
# log messages to be logged locally.
#
ifdef(`LOGHOST', ,
user.err /dev/sysmsg
user.err /var/adm/messages
user.alert `root, operator'
user.emerg *
)

#auth.notice のとこの行の1カラム目の "#" を削除してくらさい。
んで、 #pkill -HUP syslogd とかしてくらさい。

いっそ、OS Reboot しちゃった方が良いカモ。

□動作確認


○less とかでみて。

/etc/log/authlog の中身はテキストファイルなので、 more や less で 見れます。 vi でも良いかもね。

んで、驚くべきことに・・・・
中国や韓国から ssh で繋ごうとしている

不埒なヤカラ

がよく接続してきていまつ。
なので、 tcp wapper とかで信用になる接続元のみを接続するよう、 /etc/hosts.deny と /etc/hosts.allow を設定したほうが良いね。




go back    next
Copyright(c) ORATORIO-TANGRAM.com 2001-2007 All Rights Reserved.
Total:counter