📄 pwdauth.8
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 14:23:58 1996%%Pages: (atend)%%DocumentFonts: (atend)/devps 180 dict def devps begin/res 10.000000 def/y_offset 843 def/X{exch}bind def/mm {transform round X round X itransform} bind def/r{rmoveto}bind def/m{moveto}bind def/l{lineto}bind def/rl{rlineto}bind def/st{stroke}bind def/gs{gsave}bind def/gr{grestore}bind def/cp{currentpoint}bind def/np{newpath}bind def/ct{curveto}bind defsystemdict /setpacking known { /savepacking currentpacking def true setpacking } if/m0{0 0 moveto}bind def/xc{//res div}bind def/yc{//res neg div //y_offset add}bind def/lc{yc X xc X l st}bind def/mc{yc X xc X m}bind def/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def/V{//res neg div //y_offset addcurrentpoint pop Xm}bind def/H{//res div0 transform X round X itransform popcurrentpoint X popmoveto}bind def/h{//res div 0 r}bind def/v{//res neg div 0 X r}bind def/S{X H show}bind def/A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def/psize 10 def/height 0 def/cheight { height 0 ne { height } { psize } ifelse } bind def/slant 0 def/FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def [psize 0 cheight slant sin slant cos div mul cheight 0 0] makefont setfont}bind def/shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fillgr}bind def1 setlinecap/resolution res 72 mul def/startFig { /SavedState save def userdict maxlength dict begin currentpoint transform DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix itransform moveto /ury exch def /urx exch def /lly exch def /llx exch def /y exch 72 mul resolution div def /x exch 72 mul resolution div def currentpoint /cy exch def /cx exch def /sx x urx llx sub div def /sy y ury lly sub div def sx sy scale cx sx div llx sub cy sy div ury sub translate /DefFigCTM matrix currentmatrix def /initmatrix { DefFigCTM setmatrix } def /defaultmatrix { DefFigCTM exch copy } def /initgraphics { DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix DefFigCTM setmatrix } def /showpage { initgraphics } def}bind def/clipFig { currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll exch lineto exch lineto exch lineto closepath clip newpath moveto}bind def/doclip { llx lly urx ury clipFig } def/endFig { end SavedState restore}bind def/globalstart { fontnum psize slant height resolution currentpoint pagesave restore gsave }bind def/globalend { grestore moveto /resolution exch def /height exch def /slant exch def /psize exch def /fontnum exch def F /pagesave save def}bind def/fontnum 1 def systemdict /setpacking known { savepacking setpacking} ifend/BP{save mark devps begin m0/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecapcurrentlinejoin currentdash currentgray currentmiterlimit ] cvx def}bind def/EP{end cleartomark restore showpage}def/Encoding-1 256 array def0 1 255 {Encoding-1 exch /.notdef put} forEncoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-BEncoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-bEncoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accentsEncoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessiEncoding-1dup 8#41 /copyright putdup 8#42 /registered putdup 8#43 /trademark putdup 8#44 /logicalnot putdup 8#45 /Eth putdup 8#46 /eth putdup 8#47 /Thorn putdup 8#50 /thorn putdup 8#51 /brokenbar putdup 8#52 /degree putdup 8#53 /divide putdup 8#54 /multiply putdup 8#55 /minus putdup 8#56 /onehalf putdup 8#57 /onequarter putdup 8#60 /threequarters putdup 8#101 /Aacute putdup 8#102 /Acircumflex putdup 8#103 /Adieresis putdup 8#104 /Agrave putdup 8#105 /Aring putdup 8#106 /Atilde putdup 8#107 /Ccedilla putdup 8#110 /Eacute putdup 8#111 /Ecircumflex putdup 8#112 /Edieresis putdup 8#113 /Egrave putdup 8#114 /Iacute putdup 8#115 /Icircumflex putdup 8#116 /Idieresis putdup 8#117 /Igrave putdup 8#120 /Ntilde putdup 8#121 /Oacute putdup 8#122 /Ocircumflex putdup 8#123 /Odieresis putdup 8#124 /Ograve putdup 8#125 /Otilde putdup 8#126 /Scaron putdup 8#127 /Uacute putdup 8#130 /Ucircumflex putdup 8#131 /Udieresis putdup 8#132 /Ugrave putdup 8#133 /Ydieresis putdup 8#134 /Zcaron putdup 8#135 /aacute putdup 8#136 /acircumflex putdup 8#137 /adieresis putdup 8#140 /agrave putdup 8#141 /aring putdup 8#142 /atilde putdup 8#143 /ccedilla putdup 8#144 /eacute putdup 8#145 /ecircumflex putdup 8#146 /edieresis putdup 8#147 /egrave putdup 8#150 /iacute putdup 8#151 /icircumflex putdup 8#152 /idieresis putdup 8#153 /igrave putdup 8#154 /ntilde putdup 8#155 /oacute putdup 8#156 /ocircumflex putdup 8#157 /odieresis putdup 8#160 /ograve putdup 8#161 /otilde putdup 8#162 /scaron putdup 8#163 /uacute putdup 8#164 /ucircumflex putdup 8#165 /udieresis putdup 8#166 /ugrave putdup 8#167 /ydieresis putdup 8#170 /zcaron putpop/Enc-dict 30 dict defEnc-dict /tmpstr1 50 string putEnc-dict /tmpstr2 50 string putEnc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put/AEnc-def { % arguments: the original font's name, encoding nrEnc-dict begintmpstr2 cvs /Enc-no exch def % Remember the number in a stringdup /OrigName exch def % remember the namefindfont dup maxlength dict /newdict exch def % get dictionary for new font{ exch dup /FID ne { exch newdict 3 1 roll put } { pop pop } % Ignore FID ifelse} forallnewdict begin/Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encodingcurrentdict /UniqueID known{ /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueIDend % newdict/FNlength OrigName tmpstr1 cvs length def % convert name, remember lengthFNlength 1 add Enc-no length add stringdup 0 OrigName tmpstr1 cvs putintervaldup FNlength (-) putintervaldup FNlength 1 add Enc-no putintervaldup 0 tmpstr1 0 FNlength getinterval putinterval % Add old namecvn dup newdict /FontName 3 2 roll put newdict definefontend % Enc-dict} def/Times-Roman 1 AEnc-def pop/R-1{/Times-Roman-1 FF}def/R{/Times-Roman FF}def/B{/Times-Bold FF}def/I{/Times-Italic FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R(PWDAUTH)505 720 A1233(\()S1283(\))S2696(Eighth)S(Edition)296 2989 A(PWDAUTH)505 4664 A5177(\()S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(pwdauth)S10 R-11451(-)S10 R1533(password)S1938(authentication)S2533(program)S1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 B(/usr/lib/pwdauth)717 1080 A1536 V9 R720(D)S722(DE)S790(ES)S848(SC)S900(CR)S962(RI)S1024(IP)S1057(PT)S1109(TI)S1167(IO)S1200(ON)S1268(N)S1656 V10 B1080(Pwdauth)S10 R1493(is)S1586(a)S1657(program)S2024(that)S2201(is)S2294(used)S2504(by)S2630(the)S10 B2779(crypt)S10 R3009(\(3\))S3153(function)S3514(to)S3618(do)S3744(the)S3893(hard)S4098(work.)S4382(It)S4471(is)S4565(a)S4637(setuid)S4904(root)S(util-)168 5093 A1776 V1080(ity)S1211(so)S1325(that)S1501(it)S1582(is)S1674(able)S1867(to)S1970(read)S2169(the)S2317(shadow)S2649(password)S3054(\256le.)S1944 V10 B1080(Pwdauth)S10 R1492(expects)S1819(on)S1944(standard)S(input)206 2310 A2541(two)S2717(null)S2898(terminated)S3354(strings,)S3672(the)S3820(password)S4225(typed)S4473(by)S4599(the)S4748(user,)S4967(and)S5138(the)S2064 V1080(salt.)S1307(That)S1529(is,)S1658(the)S1818(two)S2006(arguments)S2461(of)S2581(the)S10 B2740(crypt)S10 R3006(function.)S3427(The)S(input)206 3620 A3862(read)S4072(in)S4186(a)S4267(single)S4543(read)S4753(call)S4935(must)S5166(be)S2184 V(1024)200 1080 A1305(characters)S1740(or)S1849(less)S2025(including)S2429(the)S2577(nulls.)S10 B2847(Pwdauth)S10 R3259(takes)S3491(one)S3661(of)S3770(two)S3946(actions)S4256(depending)S4699(on)S4824(the)S4972(salt.)S2352 V1080(If)S1179(the)S1333(salt)S1504(has)S1669(the)S1823(form)S2050(")S10 B2091(##)S10 I2191(user)S10 R2364(")S2436(then)S2640(the)S10 I2794(user)S10 R2998(is)S3097(used)S3313(to)S3423(index)S3678(the)S3833(shadow)S4172(password)S4584(\256le)S4745(to)S4855(obtain)S5138(the)S2472 V1080(encrypted)S1506(password.)S1965(The)S(input)206 2151 A2386(password)S2795(is)S2891(encrypted)S3316(with)S3523(the)S3674(one-way)S4049(encryption)S4507(function)S4870(contained)S2592 V1080(within)S10 B1362(pwdauth)S10 R1768(and)S1938(compared)S2360(to)S2463(the)S2611(encrypted)S3033(password)S3438(from)S3659(the)S3807(shadow)S4139(password)S4545(\256le.)S4750(If)S4844(equal)S5088(then)S2712 V10 B1080(pwdauth)S10 R1502(returns)S1823(the)S1987(string)S2257(")S10 B2298(##)S10 I2398(user)S10 R2571(")S2653(with)S2873(exit)S3064(code)S3294(0,)S3409(otherwise)S3841(exit)S4032(code)S4262(2)S4352(to)S4470(signal)S4750(failure.)S5104(The)S2832 V1080(string)S1338(")S10 B1379(##)S10 I1479(user)S10 R1652(")S1722(is)S1818(also)S2009(returned)S2374(if)S2465(both)S2672(the)S2824(shadow)S3161(password)S3571(and)S3746(the)S(input)206 3899 A4135(password)S4545(are)S4699(null)S4885(strings)S5183(to)S2952 V1080(allow)S1329(a)S1399(password-less)S1989(login.)S3120 V1080(If)S1176(the)S1327(salt)S1495(is)S1590(not)S1746(of)S1858(the)S2009(form)S2233(")S10 B2274(##)S10 I2374(user)S10 R2547(")S2616(then)S2817(the)S2968(password)S3376(is)S3471(encrypted)S3896(and)S4069(the)S4220(result)S4472(of)S4584(the)S4735(encryption)S5194(is)S3240 V1080(returned.)S1491(If)S1584(salt)S1749(and)S1919(password)S2324(are)S2473(null)S2654(strings)S2947(then)S3145(a)S3215(null)S3396(string)S3650(is)S3742(returned.)S3408 V1080(The)S1276(return)S1556(value)S1813(is)S(written)286 1919 A2244(to)S2361(standard)S2741(output)S3036(as)S3159(a)S3243(null)S3438(terminated)S3908(string)S4176(of)S(1024)200 4299 A4538(characters)S4987(or)S5110(less)S3528 V1080(including)S1484(the)S1632(null.)S3696 V1080(The)S1262(exit)S1438(code)S1653(is)S1745(1)S1820(on)S1945(any)S2115(error.)S3864 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S3984 V10 B1080(crypt)S10 R1310(\(3\),)S10 B1478(passwd)S10 R1791(\(5\).)S4152 V9 R720(N)S722(NO)S790(OT)S858(TE)S916(ES)S974(S)S4272 V10 R1080(A)S1178(password)S1583(must)S1803(be)S1923(checked)S2278(like)S2454(in)S2557(this)S2727(example:)S4440 V(pw_ok)273 1440 A1738(=)S1820(\(strcmp\(crypt\(key,)S2598(pw->pw_passwd\),)S3365(pw->pw_passwd\))S4107(==)S4246(0\);)S4608 V1080(The)S(second)279 1262 A1566(argument)S1971(of)S2080(crypt)S2312(must)S2532(be)S2652(the)S2800(entire)S3055(encrypted)S3477(password)S3882(and)S4052(not)S4205(just)S4375(the)S4523(two)S4699(character)S5095(salt.)S4776 V9 R720(A)S722(AU)S790(UT)S858(TH)S916(HO)S984(OR)S1052(R)S4896 V10 R1080(Kees)S1307(J.)S1396(Bot)S1566(\(kjb@cs.vu.nl\))S7903 V720(Page)S941(1)S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -