diff options
Diffstat (limited to 'ja/man/man5/utmp.5')
-rw-r--r-- | ja/man/man5/utmp.5 | 219 |
1 files changed, 0 insertions, 219 deletions
diff --git a/ja/man/man5/utmp.5 b/ja/man/man5/utmp.5 deleted file mode 100644 index ef6434ee69..0000000000 --- a/ja/man/man5/utmp.5 +++ /dev/null @@ -1,219 +0,0 @@ -.\" Copyright (c) 1980, 1991, 1993 -.\" The Regents of the University of California. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" 3. All advertising materials mentioning features or use of this software -.\" must display the following acknowledgement: -.\" This product includes software developed by the University of -.\" California, Berkeley and its contributors. -.\" 4. Neither the name of the University nor the names of its contributors -.\" may be used to endorse or promote products derived from this software -.\" without specific prior written permission. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" @(#)utmp.5 8.2 (Berkeley) 3/17/94 -.\" %Id: utmp.5,v 1.8 1998/06/28 21:33:42 hoek Exp % -.\" -.\" jpman %Id: utmp.5,v 1.3 1998/06/17 07:53:04 kumano Stab % -.Dd March 17, 1994 -.Dt UTMP 5 -.Os BSD 4 -.Sh 名称 -.Nm utmp , -.Nm wtmp , -.Nm lastlog -.Nd ログイン記録 -.Sh 書式 -.Fd #include <sys/types.h> -.Fd #include <utmp.h> -.Sh 解説 -.Aq Pa utmp.h -ファイルは、 -.Nm utmp -ファイルでの現在のユーザについての情報や -.Nm wtmp -ファイル中でのログインやログアウトの情報、 -.Nm lastlog -ファイル中での最終ログイン情報の記録のために使われる構造体を -宣言しています。 -時刻の変更やシャットダウンおよびリブートのタイムスタンプは、同じように -.Nm wtmp -ファイルに記録されます。 -.Pp -これらのファイルは、忙しいシステムでは急速に大きくなりますので、 -毎日もしくは毎週ローテションすることを推奨します。 -もし、これらのファイルのどれかが存在しない場合、そのファイルは作成されません。 -これらのファイルは、手動で作成されなければならず、 -.Xr newsyslog 8 -によって管理されます。 -.Bd -literal -offset indent -#define _PATH_UTMP "/var/run/utmp" -#define _PATH_WTMP "/var/log/wtmp" -#define _PATH_LASTLOG "/var/log/lastlog" - -#define UT_NAMESIZE 16 -#define UT_LINESIZE 8 -#define UT_HOSTSIZE 16 - -struct lastlog { - time_t ll_time; - char ll_line[UT_LINESIZE]; - char ll_host[UT_HOSTSIZE]; -}; - -struct utmp { - char ut_line[UT_LINESIZE]; - char ut_name[UT_NAMESIZE]; - char ut_host[UT_HOSTSIZE]; - long ut_time; -}; -.Ed -.Pp -ユーザがログインするたびに、 -.Xr login 1 -プログラムは -.Nm lastlog -ファイル中のユーザの -.Tn UID -を検索します。 -もし見つかった場合、ユーザが最後にログインした時刻のタイムスタンプ、 -端末線、ホスト名が標準出力に書き出されます ( -ログインが -.Em メッセージを表示しない -ように設定されていない場合。 -.Xr login 1 -を参照 -)。 -.Nm login -プログラムは、その後 -.Nm lastlog -ファイルに新しいログイン時刻を記録します。 -.Pp -新しい -.Fa lastlog -への記録が書き出された後で、 -.\" the -.\" .Xr libutil 3 -.\" routine -.Nm utmp -ファイルがオープンされ、ユーザに対する -.Fa utmp -記録が挿入されます。 -この記録は、ユーザがログアウトして削除される時まで保持されます。 -.Nm utmp -ファイルは、 -.Xr rwho 1 , -.Xr users 1 , -.Xr w 1 , -.Xr who 1 -プログラムで使われます。 -.Pp -次に、 -.Xr login -プログラムは -.Nm wtmp -ファイルをオープンし、ユーザの -.Fa utmp -記録を追加します。 -同じ -.Fa utmp -記録が更新されたタイムスタンプ付きで、ユーザがログアウトした時に、 -ファイルに追加されます ( -.Xr init 8 -参照)。 -.Nm wtmp -ファイルは、 -.Xr last 1 -と -.Xr ac 8 -プログラムで使われます。 -.Pp -時刻変更やシャットダウン・リブートの際には、 -以下の項目が -.Nm wtmp -ファイルに記録されます。 -.Pp -.Bl -tag -width shutdownxx -compact -.It Li reboot -.It Li shutdown -システムのリブートやシャットダウンが開始された。 -.Fa ut_line -フィールドに -.Ql \&~ -と言う文字が、 -.Fa ut_name -フィールド中に -.Li reboot -もしくは -.Li shutdown -が記録されます ( -.Xr shutdown 8 -と -.Xr reboot 8 -参照)。 -.Pp -.It Li date -システム時刻が手動もしくは自動で更新された ( -.Xr date 1 -参照)。 -コマンド名 -.Xr date -がフィールド -.Fa ut_name -に記録されます。 -.Fa ut_line -フィールド中の -.Ql \\*(Ba -文字は、変更前の時刻を示し、 -.Ql \&{ -文字は新しい時刻を示しています。 -.El -.Sh 関連ファイル -.Bl -tag -width /var/log/lastlog -compact -.It Pa /var/run/utmp -.Nm utmp -ファイル。 -.It Pa /var/log/wtmp -.Nm wtmp -ファイル。 -.It Pa /var/log/lastlog -.Nm lastlog -ファイル。 -.El -.Sh 関連項目 -.Xr last 1 , -.Xr login 1 , -.Xr w 1 , -.Xr who 1 , -.Xr ac 8 , -.Xr init 8 -.Sh 歴史 -A -.Nm utmp -と -.Nm wtmp -ファイル書式は -.At v6 -から登場しました。 -.Nm lastlog -ファイル書式は -.Bx 3.0 -から登場しました。 |