1 .\" Copyright 1989 - 1993, Julianne Frances Haugh
2 .\" All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
13 .\" may be used to endorse or promote products derived from this software
14 .\" without specific prior written permission.
16 .\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" $Id: shadow.3,v 1.2 2001/11/16 17:01:33 ankry Exp $
30 .\" Japanese Version Copyright (c) 1997 Kazuyoshi Furutaka
31 .\" all rights reserved.
32 .\" Translated Fri Feb 14 23:06:00 JST 1997
33 .\" by Kazuyoshi Furutaka <furutaka@Flux.tokai.jaeri.go.jp>
37 shadow \- °Å¹æ²½¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ëÍѥ롼¥Á¥ó
39 .B #include <shadow.h>
41 .B struct spwd *getspent();
43 .B struct spwd *getspnam(char
50 .B struct spwd *fgetspent(FILE
53 .B struct spwd *sgetspent(char
56 .B int putspent(struct spwd
66 ¤Ïshadow¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë\fI/etc/shadow\fR¤ÎÆâÍƤòÁàºî¤¹¤ë¥ë¡¼¥Á¥ó¤Ç¤¢¤ë¡£
71 char *sp_namp; /* ¥æ¡¼¥¶¤Î¥í¥°¥¤¥ó̾ */
73 char *sp_pwdp; /* °Å¹æ²½¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É */
75 long sp_lstchg; /* ºÇ½ª¥Ñ¥¹¥ï¡¼¥ÉÊѹ¹Æü»þ */
77 int sp_min; /* ¥Ñ¥¹¥ï¡¼¥ÉÊѹ¹ÉÔǽÆü¿ô */
79 int sp_max; /* ¥Ñ¥¹¥ï¡¼¥ÉÊѹ¹Í×µáËø¤ÎÆü¿ô */
81 int sp_warn; /* ¥Ñ¥¹¥ï¡¼¥É´ü¸ÂËþλ·Ù¹ðÆü¿ô */
83 int sp_inact; /* ¥¢¥«¥¦¥ó¥È̵¸ú¤Þ¤Ç¤ÎÆü¿ô */
85 int sp_expire; /* ¥¢¥«¥¦¥ó¥È´ü¸ÂËþλ¤ÎÆüÉÕ */
87 int sp_flag; /* ¾Íè¤Î»ÈÍѤËͽÌó */
94 sp_namp \- ¥Ì¥ë½ªÃ¼¤Î¥æ¡¼¥¶Ì¾¤Ø¤Î¥Ý¥¤¥ó¥¿
96 sp_pwdp \- ¥Ì¥ë½ªÃ¼¤Î¥Ñ¥¹¥ï¡¼¥É¤Ø¤Î¥Ý¥¤¥ó¥¿
98 sp_lstchg \- 1970ǯ1·î1Æü¤«¤é¥Ñ¥¹¥ï¡¼¥ÉºÇ½ªÊѹ¹Æü»þËø¤ÎÆü¿ô
100 sp_min \- ¥Ñ¥¹¥ï¡¼¥ÉÊѹ¹¤¬½ÐÍè¤ëÍͤˤʤë¤Þ¤Ç¤ÎÆü¿ô
102 sp_max \- ¥Ñ¥¹¥ï¡¼¥É¤òÊѹ¹¤·¤Ê¤¯¤Æ¤âÎɤ¤Æü¿ô
104 sp_warn \- ¥Ñ¥¹¥ï¡¼¥É¤¬Ìµ¸ú¤È¤Ê¤ë¤Þ¤Ç¤Ë¥æ¡¼¥¶¤Ë¥Ñ¥¹¥ï¡¼¥É¤¬
105 ̵¸ú¤È¤Ê¤ê¤«¤«¤Ã¤Æ¤¤¤ë¤È¤Î·Ù¹ð¤ò½Ð¤¹Æü¿ô
107 sp_inact \- ¥Ñ¥¹¥ï¡¼¥É¤¬Ìµ¸ú¤È¤Ê¤Ã¤Æ¤«¤é¥¢¥«¥¦¥ó¥È¤¬ÉÔǽ¤È¤Ê¤ê
108 »ÈÍѤǤ¤Ê¤¯¤Ê¤ë¤Þ¤Ç¤ÎÆü¿ô
110 sp_expire \- 1970ǯ1·î1¤«¤é¥¢¥«¥¦¥ó¥È»ÈÍÑÉÔǽ¤È¤Ê¤ëËø¤ÎÆü¿ô
112 sp_flag \- ¾Íè¤Î»ÈÍѤËͽÌó
114 \fBgetspent\fR, \fBgetspname\fR, \fBfgetspent\fR, µÚ¤Ó \fBsgetspent\fR
115 ¤Ï³Æ¡¹\fBstruct spwd\fR¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
116 \fBgetspent\fR¤Ï¥Õ¥¡¥¤¥ë¤«¤é¼¡¤Î¥¨¥ó¥È¥ê¤ò¡¢\fBfgetspent\fR¤Ï
117 »ØÄꤵ¤ì¤¿¥¹¥È¥ê¡¼¥à¤«¤é¼¡¤Î¥¨¥ó¥È¥ê¤òÊÖ¤¹¡£
118 ¤³¤ÎºÝ¡¢¥Õ¥¡¥¤¥ë¤ÏÀµ¤·¤¤½ñ¼°¤Ç¤¢¤ë²¾Äꤷ¤Æ¤¤¤ë¡£
119 \fBsgetspent\fR¤ÏÆþÎϤȤ·¤ÆÍ¿¤¨¤é¤ì¤¿Ê¸»úÎó¤òÍѤ¤¤Æ\fBstruct spwd\fR
121 \fBgetspnam\fR¤Ï¥Õ¥¡¥¤¥ëÃæ¤Î¸½ºß¤Î°ÌÃÖ¤«¤é\fBname\fR¤ËÉä¹ç¤¹¤ë¥¨¥ó¥È¥ê
124 \fBsetspent\fRµÚ¤Ó\fBendspent\fR¤Ïshadow¤·¤¿¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Ø¤Î
125 ¥¢¥¯¥»¥¹¤òÉס¹³«»ÏµÚ¤Ó½ªÎ»¤¹¤ë¤¿¤á¤ËÍѤ¤¤ë¤³¤È¤¬½ÐÍè¤ë¡£
127 \fB/etc/shadow\fR¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ëÇÓ¾Ū¤Ê¥¢¥¯¥»¥¹¤òÊݾڤ¹¤ë¤¿¤á¤Ë¡¢
128 \fBlckpwdf\fRµÚ¤Ó\fBulckpwdf\fR¥ë¡¼¥Á¥ó¤òÍѤ¤¤Ê¤¯¤Æ¤Ï¤Ê¤é¤Ê¤¤¡£
129 \fBlckpwdf\fR¤Ï\fBpw_lock\fR¤òÍѤ¤¤ÆºÇÂç15Éô֥í¥Ã¥¯¤ò¤·¤è¤¦¤È¤¹¤ë¡£
130 ¤½¤·¤Æ¡¢ºÇ½é¤Î15ÉäλĤê¤òÍѤ¤¤ÆÆóÅÙÌܤΥí¥Ã¥¯¤ò¤·¤è¤¦¤È¤·Â³¤±¤ë¡£
131 Á´Éô¤Ç15Éô֤δ֤ˤ¤¤º¤ì¤«¤Î»î¤ß¤¬¼ºÇÔ¤·¤¿¾ì¹ç¤Ï¡¢\fBlckpwdf\fR¤Ï-1¤òÊÖ¤¹¡£
132 ¤¤¤º¤ì¤Î¥í¥Ã¥¯¤âÀ®¸ù¤·¤¿¾ì¹ç¤Ï0¤¬ÊÖ¤µ¤ì¤ë¡£
134 ¤³¤ì¤é¤Î¥ë¡¼¥Á¥ó¤Ï¡¢¥¨¥ó¥È¥ê¤¬»Ä¤Ã¤Æ¤¤¤Ê¤¤¾ì¹çËô¤Ï½èÍý¤Î²áÄø¤Ç
135 ¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¤ËNULL¤òÊÖ¤¹¡£
136 ÊÖ¤êÃͤ¬\fBint\fR¤Ç¤¢¤ë¥ë¡¼¥Á¥ó¤Ï¡¢À®¸ù»þ¤Ë¤Ï0¤ò¡¢¼ºÇÔ»þ¤Ë¤Ï-1¤òÊÖ¤¹¡£
138 shadow¤µ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤Ø¤Î¥¢¥¯¥»¥¹¤ÏÀ©¸Â¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢
139 ¤³¤ì¤é¤Î¥ë¡¼¥Á¥ó¤Ï¥¹¡¼¥Ñ¡¼¥æ¡¼¥¶¤Î¤ßÍѤ¤¤ë¤³¤È¤¬½ÐÍè¤ë¡£
141 /etc/shadow \- °Å¹æ²½¤µ¤ì¤¿¥æ¡¼¥¶¥Ñ¥¹¥ï¡¼¥É
146 Julianne Frances Haugh (jockgrrl@ix.netcom.com)