.\"$Id: newgrp.1,v 1.12 2002/03/09 19:22:30 ankry Exp $ .\" Copyright 1991, Julianne Frances Haugh .\" 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. Neither the name of Julianne F. Haugh 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 JULIE HAUGH 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 JULIE HAUGH 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. .\" .\" Japanese Version Copyright (c) 1997 Kazuyoshi Furutaka .\" all rights reserved. .\" Translated Fri Feb 14 23:06:00 JST 1997 .\" by Kazuyoshi Furutaka .\" Updated & Modified Sun 3 Mar 2002 by NAKANO Takeo .\" Modified Tue 16 Sep 2002 by NAKANO Takeo .\" .TH NEWGRP 1 .\"O .SH NAME .SH 名前 .\"O newgrp \- log in to a new group newgrp \- 新しいグループにログインする .br .\"O sg \- execute command as different group ID sg \- 別のグループ ID でコマンドを実行する .\"O .SH SYNOPSIS .SH 書式 \fBnewgrp\fR [\fB-\fR] [\fIgroup\fR] .br \fBsg\fR [\fB-\fR] [\fIgroup\fR [[\fB-c\fR] \fIcommand\fR]] .\"O .SH DESCRIPTION .SH 説明 .\"O \fBnewgrp\fR is used to change the current group ID during a login session. .\"O If the optional \fB\-\fR flag is given, the user's environment .\"O will be reinitialized as though the user had logged in, otherwise .\"O the current environment, including current working directory, .\"O remains unchanged. .B newgrp はログインセッション中に現在のグループ ID を変更するために用いられる。 オプションとして \fB\-\fR フラグを与えた場合は、 新たにログインしたのと同じ様に環境が再初期化される。 そうでない場合は、現在の作業ディレクトリを含めて、 現在の環境は変化しない。 .PP .\"O \fBnewgrp\fR changes the current real group ID to the named group, or to the .\"O default group listed in \fI/etc/passwd\fR if no group name is given. The .\"O user will be prompted for a password if she do not have a password and the .\"O group does, or if the user is not listed as a member and the group has a .\"O password. The user will be denied access if the group password is empty and .\"O the user is not listed as a member. .B newgrp は現在の実グループ ID を、指定したグループに (グループ名を指定しなかった場合は \fI/etc/passwd\fR に記載されたデフォルトのグループに) 変更する。 ユーザにはパスワードがなくグループにはある場合、 あるいはユーザがグループのメンバーではなく グループにパスワードがある場合には、 そのユーザはパスワードの入力を求められる。 グループのパスワードが設定されておらず、 かつユーザがグループのメンバーでない場合は、 アクセスは拒否される。 .PP .\"O The \fBsg\fR command works similiar to \fBnewgrp\fR but accepts a command. .\"O The command will be executed with the Bourne shell. With most shells you .\"O may run \fBsg\fR from, you need to enclose multi-word commands in quotes. .\"O Another difference between \fBnewgrp\fR and \fBsg\fR is that some shells .\"O treat \fBnewgrp\fR specially, replacing themselves with a new instance of .\"O a shell that \fBnewgrp\fR creates. This doesn't happen with \fBsg\fR, so .\"O upon exit from a \fBsg\fR command you are returned to your previous group ID. .B sg コマンドは .B newgrp と同様に動作するが、コマンドを受け付ける。 このコマンドは Bourne シェルで実行される。 コマンドが複数の単語からなる場合は、 sg の実行元となるであろうシェルのほとんどにおいて、 これらをクォートする必要があるだろう。 .BR newgrp " と " sg のもう一つの違いは、 特定のシェルが \fBnewgrp\fR を特別に扱う点にある。 このようなシェルは、自分自身を .B newgrp が生成した新しい実体と置き換える。このようなことは .B sg では起きないので、 .B sg コマンドから戻った際には以前のグループ ID に戻る。 .\"O .SH FILES .SH ファイル .\"O /etc/passwd \- user account information /etc/passwd \- ユーザアカウント情報 .br .\"O /etc/group \- group information /etc/group \- グループ情報 .\"O .SH SEE ALSO .SH 関連項目 .BR id (1), .BR login (1), .BR su (1) .\"O .SH AUTHOR .SH 著者 Julianne Frances Haugh