ユーザーのログイン記録を調べる。 しばらく使ってないサーバーへ久しぶりにログインしたとき、誰かが使ってないか、Rootパスワード取られてないか不安に駆られることとかあります。サーバ乗っ取られてウチのサーバーがアタックしていると通報受けることも稀にあります。数十台あるとさすがに管理してられないのもあるので。。。 自分以外のユーザーがログインしてファイルを開いてたりしないか確認することもします。 ログイン状況の調査によく使うコマンドは次の通りです。 コマンド名 大体の用途 lastlog Unixの全ユーザーの最終ログインを見る last ログイン履歴を新しいモノから順に見る。 w 一文字でも立派なコマンド、ログインしている(tty使用中)のユーザー一覧 who wと殆ど同じ finger 昔は色々用途もあったけど、いまはwho/wと殆ど同じ ps 起動中のプロセスを見る 僕が実際使うのは 次