b630b99885
Reviewed by: kano@na.rim.or.jp
229 lines
6.4 KiB
Groff
229 lines
6.4 KiB
Groff
.\" Copyright (c) 1988, 1990, 1993, 1994
|
|
.\" 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.
|
|
.\"
|
|
.\" @(#)su.1 8.2 (Berkeley) 4/18/94
|
|
.\" %FreeBSD: src/usr.bin/su/su.1,v 1.33.2.1 2004/10/15 22:31:56 simon Exp %
|
|
.\" $FreeBSD$
|
|
.\"
|
|
.Dd October 3, 2004
|
|
.Dt SU 1
|
|
.Os
|
|
.Sh ̾¾Î
|
|
.Nm su
|
|
.Nd °ì»þŪ¤Ë¾¤Î¥æ¡¼¥¶¤Ë¤Ê¤ê¤«¤ï¤ë
|
|
.Sh ½ñ¼°
|
|
.Nm
|
|
.Op Fl
|
|
.Op Fl flms
|
|
.Op Fl c Ar class
|
|
.Op Ar login Op Ar args
|
|
.Sh ²òÀâ
|
|
.Nm
|
|
¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï PAM ·Ðͳ¤ÇŬÀڤʥ桼¥¶»ñ³Ê¤òÍ׵ᤷ¡¢
|
|
¤½¤Î¥æ¡¼¥¶ ID ¤ËÀÚ¤êÂؤ¨¤Þ¤¹ (¥Ç¥Õ¥©¥ë¥È¥æ¡¼¥¶¤Ï¥¹¡¼¥Ñ¥æ¡¼¥¶¤Ç¤¹)¡£
|
|
¤½¤Î¸å¥·¥§¥ë¤¬¼Â¹Ô¤µ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
¤¹¤Ù¤Æ¤Î¥Ý¥ê¥·¤ÎÀßÄê¤Ë¤Ï PAM ¤¬»ÈÍѤµ¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
|
|
.Ev USER ,
|
|
.Ev HOME ,
|
|
.Ev SHELL
|
|
°Ê³°¤Î´Ä¶ÊÑ¿ô¤Ï°ú¤·Ñ¤¬¤ì¤Þ¤¹¡£
|
|
.Ev HOME
|
|
¤È
|
|
.Ev SHELL
|
|
¤Ï¥¿¡¼¥²¥Ã¥È¤È¤Ê¤ë¥í¥°¥¤¥ó¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤˤʤê¤Þ¤¹¡£
|
|
.Ev USER
|
|
¤Ï¡¢¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤Î¥æ¡¼¥¶ ID ¤¬ 0 °Ê³°¤Ç¤¢¤ì¤Ð¡¢
|
|
¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤Î¤â¤Î¤¬¥»¥Ã¥È¤µ¤ì¤Þ¤¹¡£
|
|
0 ¤Î¾ì¹ç¤ÏÊѹ¹¤µ¤ì¤Þ¤»¤ó¡£
|
|
¼Â¹Ô¤µ¤ì¤ë¥·¥§¥ë¤Ï¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤Ç¤¹¡£
|
|
¤³¤ì¤Ï
|
|
.Nm
|
|
¤ÎÅÁÅýŪ¤Ê¤Õ¤ë¤Þ¤¤¤Ç¤¹¡£
|
|
¥ª¥ê¥¸¥Ê¥ë¥æ¡¼¥¶¤Î¥í¥°¥¤¥ó¥¯¥é¥¹
|
|
.Ns ( Xr login.conf 5
|
|
»²¾È) ¤Î»ñ¸»À©Ìó¤È¥»¥Ã¥·¥ç¥óÍ¥ÀèÅÙ¤âÄ̾ïÊݤ¿¤ì¤Þ¤¹¡£
|
|
Îã³°¤Ï¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤¬¥æ¡¼¥¶ ID 0 ¤Î¾ì¹ç¤Ç¤¹¡£
|
|
.Pp
|
|
¥ª¥×¥·¥ç¥ó¤È¤·¤Æ¤Ï¡¢°Ê²¼¤Î¤â¤Î¤¬¤¢¤ê¤Þ¤¹:
|
|
.Bl -tag -width Ds
|
|
.It Fl f
|
|
¥·¥§¥ë¤È¤·¤Æ
|
|
.Xr csh 1
|
|
¤¬¼Â¹Ô¤µ¤ì¤ë¾ì¹ç¡¢
|
|
.Dq Pa .cshrc
|
|
¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ß¤Þ¤»¤ó¡£
|
|
.It Fl l
|
|
Ä̾ï¤Ë¥í¥°¥¤¥ó¤·¤¿¾ì¹ç¤ÈƱÍͤˤʤë¤è¤¦¤Ë´Ä¶ÊÑ¿ô¤¬ÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
¤¹¤Ê¤ï¤Á¡¢´Ä¶ÊÑ¿ô¤Ï
|
|
.Ev HOME ,
|
|
.Ev SHELL ,
|
|
.Ev PATH ,
|
|
.Ev TERM ,
|
|
.Ev USER
|
|
°Ê³°¤Ï¼Î¤Æ¤é¤ì¤Þ¤¹¡£
|
|
.Ev HOME
|
|
¤È
|
|
.Ev SHELL
|
|
¤Ï¾åµ¤Î¤è¤¦¤ËÊѹ¹¤µ¤ì¤Þ¤¹¡£
|
|
.Ev USER
|
|
¤Ï¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤ÎÃͤˤʤê¤Þ¤¹¡£
|
|
.Ev PATH
|
|
¤Ï
|
|
.Dq Pa /bin:/usr/bin
|
|
¤Ë¤Ê¤ê¤Þ¤¹¡£
|
|
.Ev TERM
|
|
¤Ï¡¢¤¢¤Ê¤¿¤Î¸½ºß¤Î´Ä¶ÊÑ¿ô¤ÎÃͤˤʤê¤Þ¤¹¡£
|
|
¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤Î¥¯¥é¥¹¤Ë¤è¤ê¡¢
|
|
¥í¥°¥¤¥ó¥¯¥é¥¹¥±¡¼¥Ñ¥Ó¥ê¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ë´ð¤Å¤¡¢
|
|
´Ä¶ÊÑ¿ô¤¬ÀßÄê¤â¤·¤¯¤ÏÊѹ¹¤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£
|
|
¼Â¹Ô¤µ¤ì¤ë¥·¥§¥ë¤Ï¥¿¡¼¥²¥Ã¥È
|
|
¥í¥°¥¤¥ó¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤Ë¤Ê¤ê¡¢
|
|
¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ë°ÜÆ°¤·¤Þ¤¹¡£
|
|
»ñ¸»À©Ìó¤È¥»¥Ã¥·¥ç¥óÍ¥ÀèÅ٤ϡ¢
|
|
¥¿¡¼¥²¥Ã¥È¥¢¥«¥¦¥ó¥È¤Î¥í¥°¥¤¥ó¥¯¥é¥¹¤Î¤â¤Î¤ËÊѹ¹¤µ¤ì¤Þ¤¹¡£
|
|
.It Fl
|
|
(ʸ»ú̵¤·)
|
|
.Fl l
|
|
¤ÈƱ¤¸¤Ç¤¹¡£
|
|
.It Fl m
|
|
´Ä¶ÊÑ¿ô¤ÏÊѲ½¤·¤Þ¤»¤ó¡£
|
|
¼Â¹Ô¤µ¤ì¤ë¥·¥§¥ë¤Ï¼«Ê¬¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤Ç¡¢¥Ç¥£¥ì¥¯¥È¥ê¤Î°ÜÆ°¤â¹Ô¤ï¤ì¤Þ¤»¤ó¡£
|
|
¥»¥¥å¥ê¥Æ¥£¤ÎÍÑ¿´¤È¤·¤Æ¡¢¤â¤·¥¿¡¼¥²¥Ã¥È¥æ¡¼¥¶¤Î¥·¥§¥ë¤¬
|
|
Èóɸ½à¥·¥§¥ë
|
|
.Ns ( Xr getusershell 3
|
|
¤ÇÄêµÁ¤µ¤ì¤ë) ¤Ç¤¢¤ê¡¢¤«¤Ä¡¢¸Æ½Ð¦¤Î¼Â¥æ¡¼¥¶ ID ¤¬ 0 ¤Ç¤Ê¤±¤ì¤Ð¡¢
|
|
.Nm
|
|
¤Ï¼ºÇÔ¤·¤Þ¤¹¡£
|
|
.It Fl s
|
|
¥æ¡¼¥¶¤Î»ñ³Ê¤ÎÀßÄê¤Î°ì´Ä¤È¤·¤Æ¡¢
|
|
MAC ¥é¥Ù¥ë¤ò¥æ¡¼¥¶¤Î¥Ç¥Õ¥©¥ë¥È¥é¥Ù¥ë¤ØÀßÄꤷ¤Þ¤¹¡£
|
|
µ¯Æ°¤·¤¿¥×¥í¥»¥¹¤Î MAC ¥é¥Ù¥ë¤¬¡¢
|
|
¥æ¡¼¥¶¤Î¥Ç¥Õ¥©¥ë¥È MAC ¥é¥Ù¥ë¤ØÁ«°Ü¤¹¤ë¤Ë¤ÏÉÔ½½Ê¬¤Ç¤¢¤ë¾ì¹ç¡¢
|
|
MAC ¥é¥Ù¥ë¤ÎÀßÄê¤Ï¼ºÇÔ¤¹¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
|
|
¥é¥Ù¥ë¤ÎÀßÄ꤬¤Ç¤¤Ê¤¤¾ì¹ç¡¢
|
|
.Nm
|
|
¤Ï¼ºÇÔ¤·¤Þ¤¹¡£
|
|
.It Fl c Ar class
|
|
»ØÄꤵ¤ì¤¿¥í¥°¥¤¥ó¥¯¥é¥¹¤ÎÀßÄê¤ò»ÈÍѤ·¤Þ¤¹¡£
|
|
¥¹¡¼¥Ñ¥æ¡¼¥¶¤Î¤ß¤¬»ÈÍѤòµö¤µ¤ì¤Þ¤¹¡£
|
|
.El
|
|
.Pp
|
|
.Fl l
|
|
(¤Þ¤¿¤Ï
|
|
.Fl
|
|
) ¤È
|
|
.Fl m
|
|
¤Ï¡¢Æ±»þ¤Ë»ØÄꤹ¤ë¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£ºÇ¸å¤Ë»ØÄꤷ¤¿¤â¤Î¤¬Í¥À褵¤ì¤Þ¤¹¡£
|
|
.Pp
|
|
¥ª¥×¥·¥ç¥ó¤Î
|
|
.Ar args
|
|
¤¬¥³¥Þ¥ó¥É¥é¥¤¥ó¤Ë»ØÄꤵ¤ì¤ë¤È¡¢
|
|
¤½¤ì¤é¤Ï¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó¤Î¥í¥°¥¤¥ó¥·¥§¥ë¤Ë°ú¤ÅϤµ¤ì¤Þ¤¹¡£
|
|
¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó̾¤è¤êÁ°¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¿ô¤Ï¤¹¤Ù¤Æ
|
|
.Nm
|
|
¼«¿È¤Ë¤è¤Ã¤Æ½èÍý¤µ¤ì¡¢
|
|
¥¿¡¼¥²¥Ã¥È¥í¥°¥¤¥ó̾¤è¤ê¸å¤Î¥³¥Þ¥ó¥É¥é¥¤¥ó°ú¿ô¤Ï¤¹¤Ù¤Æ
|
|
¥í¥°¥¤¥ó¥·¥§¥ë¤ËÅϤµ¤ì¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
|
|
.Pp
|
|
¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï (ÀßÄ꤬¤µ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð) ¥¹¡¼¥Ñ¥æ¡¼¥¶¤Î¥×¥í¥ó¥×¥È¤Ï
|
|
.Dq Sy \&#
|
|
¤ËÀßÄꤵ¤ì¤Þ¤¹¡£
|
|
.Sh ´ØÏ¢¥Õ¥¡¥¤¥ë
|
|
.Bl -tag -width ".Pa /etc/pam.d/su" -compact
|
|
.It Pa /etc/pam.d/su
|
|
.Nm
|
|
¤Î PAM ÀßÄê¥Õ¥¡¥¤¥ë
|
|
.El
|
|
.Sh ´ØÏ¢¹àÌÜ
|
|
.Xr csh 1 ,
|
|
.Xr sh 1 ,
|
|
.Xr group 5 ,
|
|
.Xr login.conf 5 ,
|
|
.Xr passwd 5 ,
|
|
.Xr environ 7 ,
|
|
.Xr pam 8
|
|
.Sh ´Ä¶ÊÑ¿ô
|
|
.Nm
|
|
¤ÇÍøÍѤµ¤ì¤ë´Ä¶ÊÑ¿ô¤Ï°Ê²¼¤ÎÄ̤ê¤Ç¤¹:
|
|
.Bl -tag -width HOME
|
|
.It Ev HOME
|
|
¾åµ¤Ç¼¨¤·¤¿½ñ¤´¹¤¨¤¬¤Ê¤¤¸Â¤ê¡¢
|
|
¼Â¥æ¡¼¥¶ ID ¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£
|
|
.It Ev PATH
|
|
¾åµ¤Ç¼¨¤·¤¿½ñ¤´¹¤¨¤¬¤Ê¤¤¸Â¤ê¡¢¼Â¥æ¡¼¥¶ ID ¤Î¥Ç¥Õ¥©¥ë¥È¤Î¥µ¡¼¥Á¥Ñ¥¹¤Ç
|
|
¤¹¡£
|
|
.It Ev TERM
|
|
¤Ê¤êÂå¤ï¤ë¿Í¤¬½êͤ·¤Æ¤¤¤ëüËö¤Î¥¿¡¼¥ß¥Ê¥ë¥¿¥¤¥×¤Ç¤¹¡£
|
|
.It Ev USER
|
|
¥æ¡¼¥¶ ID ¤¬ 0 (root) °Ê³°¤Î¾ì¹ç¤Ï¡¢¥æ¡¼¥¶ ID ¤Ï¾ï¤Ë
|
|
.Nm
|
|
¸å¤Î effective ID (¥¿¡¼¥²¥Ã¥È¤È¤Ê¤ë¥æ¡¼¥¶ ID) ¤Ç¤¹¡£
|
|
.El
|
|
.Sh »ÈÍÑÎã
|
|
.Bl -tag -width 5n -compact
|
|
.It Li "su man -c catman"
|
|
¥³¥Þ¥ó¥É
|
|
.Li catman
|
|
¤ò¥æ¡¼¥¶
|
|
.Li man
|
|
¤Ç¼Â¹Ô¤·¤Þ¤¹¡£
|
|
¤¢¤Ê¤¿¤Î¼Â UID ¤¬ 0 ¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢man ¤Î¥Ñ¥¹¥ï¡¼¥É¤ò¿Ò¤Í¤é¤ì¤Þ¤¹¡£
|
|
.It Li "su man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'"
|
|
¾å¤ÈƱÍͤǤ¹¤¬¡¢¥³¥Þ¥ó¥É¤¬Ê£¿ô¤Î¸ì¤«¤é¹½À®¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
|
|
.Fl c
|
|
¥ª¥×¥·¥ç¥ó¤ò¥·¥§¥ë¤ËÅϤ¹¤¿¤á¤Ë¥¯¥©¡¼¥È¤·¤Æ¤¤¤Þ¤¹
|
|
(¤Û¤È¤ó¤É¤Î¥·¥§¥ë¤Ç¤Ï
|
|
.Fl c
|
|
¤Ø¤Î°ú¿ô¤¬Ã±°ì¸ì¤Ç¤¢¤ë¤È´üÂÔ¤·¤Þ¤¹)¡£
|
|
.It Li "su -c staff man -c 'catman /usr/share/man /usr/local/man /usr/X11R6/man'"
|
|
¾å¤ÈƱÍͤǤ¹¤¬¡¢¥í¥°¥¤¥ó¥¯¥é¥¹
|
|
.Dq staff
|
|
¤Î»ñ¸»À©¸Â¤Ë¤Æ¥¿¡¼¥²¥Ã¥È¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤¹¡£
|
|
Ãí: ¤³¤ÎÎã¤Ç¤Ï¡¢ºÇ½é¤Î
|
|
.Fl c
|
|
¥ª¥×¥·¥ç¥ó¤Ï
|
|
.Nm
|
|
¤ËŬÍѤµ¤ì¡¢2 ÈÖÌܤΤâ¤Î¤Ïµ¯Æ°¤µ¤ì¤ë¥·¥§¥ë¤Î°ú¿ô¤È¤Ê¤ê¤Þ¤¹¡£
|
|
.It Li "su -l foo"
|
|
¥æ¡¼¥¶ foo ¤Î¥í¥°¥¤¥ó¤ò¥·¥ß¥å¥ì¡¼¥È¤·¤Þ¤¹¡£
|
|
.It Li "su - foo"
|
|
¾å¤ÈƱ¤¸¤Ç¤¹¡£
|
|
.It Li "su -"
|
|
root¤Î¥í¥°¥¤¥ó¤ò¥·¥ß¥å¥ì¡¼¥È¤·¤Þ¤¹¡£
|
|
.El
|
|
.Sh Îò»Ë
|
|
.Nm
|
|
¥³¥Þ¥ó¥É¤Ï
|
|
.At v1
|
|
¤«¤éÅо줷¤Þ¤·¤¿¡£
|