File: README.euc

package info (click to toggle)
ruby-shadow 2.1.4-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 120 kB
  • sloc: ansic: 476; ruby: 17; makefile: 2
file content (80 lines) | stat: -rw-r--r-- 2,083 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Shadow Password module

Copyright (C) 1998-1999 Takaaki Tateishi <ttate@jaist.ac.jp>
Modified at: <1999/8/19 06:48:01 by ttate>
License: Free for any use with your own risk! (Ruby's License)


1. 

linuxˤshadow passwordե򰷤
Υ⥸塼롣


2. 󥹥ȡ

ruby extconf.rb
make
make install

* 
  shadow-1.3Ǥruby-1.3⤷ϤʹߤΥС
  ɬפǤ

3. Shadow::Passwd⥸塼Υ᥽åã

getspent
getspnam(name)
setspent
endspent
fgetspent(file)
sgetspent(str)
putspent(entry,file)
lckpwdf,lock
ulckpwdf,unlock
lock?

4. Structure

Shadow::Passwd::Entry (Struct::PasswdEntry)
       sp_namp - pointer to null-terminated user name.
       sp_pwdp - pointer to null-terminated password.
       sp_lstchg  -  days  since  Jan  1,  1970 password was last
                     changed.
       sp_min - days before which password may not be changed.
       sp_max - days after which password must be changed.
       sp_warn - days before password is to expire that  user  is
       warned of pending password expiration.
       sp_inact  -  days  after  password expires that account is
                    considered inactive and disabled.
       sp_expire - days since Jan 1, 1970 when  account  will  be


5. 

getspent, getspname, fgetspent, sgetspentShadow::Passwd::Entry
ȥ饯֤ޤgetspent ϥե뤫鼡Υѥ
ɥȥ֤fgetspent Ϳ줿IO鼡Υ
֤ޤsgetspentͿ줿ʸ󤫤Shadow::Passwd::Entry
ȥ饯֤ޤgetspnamϥ桼̾Ϳ/etc/shadow
餽Υ桼Shadow::Passwd::Entryȥ饯֤ޤ
եνüãnil֤ͤޤ

setspent,endspentϤ줾졢եؤΥΤϤ
˻Ȥޤ

lckpwdf(lock),ulckpwdf(unlock)/etc/shadowؤ¾Ū
¸뤿ˤޤ
lock˼ԤShadow::FileLockȤ㳰ȯޤ
lock򥤥ƥ졼ȤƻȤȤˤäơƥ졼֥åȴ
Ȥ˼ưŪunlockԤʤޤ


6. 

* man shadow
* /usr/include/shadow.h



					ttate@jaist.ac.jp