xibbar$B$3$HF#2,$G$9!#(B
Etc.passwd $B$r;H$C$F$_$F!“LL?)$i$C$?$N$GMWK>$r=P$7$F$*$-$^$9!#(B
$B8=>u$O!”(B
irb(main):028:0* Etc.passwd
=> #<struct Struct::Passwd name="_calendar", passwd="*", uid=93, gid=93,
gecos=“Calendar”, dir="/var/empty", shell="/usr/bin/false", change=0,
uclass="", expire=0>
irb(main):029:0> Etc.passwd
=> #<struct Struct::Passwd name="_ces", passwd="*", uid=32, gid=32,
gecos=“Certificate Enrollment Service”, dir="/var/empty",
shell="/usr/bin/false", change=0, uclass="", expire=0>
$B$C$F46$8$G!"(B/etc/passwd $B$r(B1$B9T$:$DFI$_9~$s$G!"(B
Struct$B$GJV$9;EMM$K$J$C$F$$$^$9!#(B
$B%V%m%C%/$rM?$($k$H!"(B
irb(main):034:0* Etc.passwd{|pw|p pw}
#<struct Struct::Passwd name="_amavisd", passwd="", uid=83, gid=83,
gecos=“AMaViS Daemon”, dir="/var/virusmails", shell="/usr/bin/false",
change=0, uclass="", expire=0>
#<struct Struct::Passwd name="_appleevents", passwd="", uid=55, gid=55,
gecos=“AppleEvents Daemon”, dir="/var/empty", shell="/usr/bin/false",
change=0, uclass="", expire=0>
$B$C$F46$8$G!"(B1$B9T$:$DFI$9~$s$G2?$+$G$-$kMM$K$J$C$F$$$^$9!#(B
$B$3$l$,!"(BRuby$BE*$K$O(B
Etc.passwd.each{|pw|p pw}
$B$H$+$C$F$d$l$?$[$&$,6C$-$,>/$J$$$H;W$C$?$N$G$9$,(B
$B$$$+$,$G$7$g$&$+!#(B
$B>/$J$/$H$b(B Etc.passwd
$B$G(B1$B9T$:$DFI$$@$7$?(BStruct$B$,JV$C$F$/$k$h$j$b(B
$B$$$$$+$J$H;W$$$^$9!#(B
Etc.passwd.to_a $B$H$+=PMh$?$[$&$,$$$$$N$G$O$J$$$+$H;W$$$^$9!#(B
$B8=>u!"(BStruct$B$N(BArray$B$r:n$kJ}K!$b$J$/$F!"(B
pw_ary=[]
Etc.passwd{|pw|pw_ary << pw}
$B$H$+$d$i$J$-$c$J$i$J$$$G$9!#(B
$B$I$&$$$&;EMM$K$7$?$i%9%^!<%H$+$H$$$&$"$?$j$^$G$O(B
$BF’$9~$a$F$$$^$;$s$,!"$H$j$"$($:LL?)$i$C$?$N$G(B
$BITK~$r=q$$$F$$^$7$?!#(B
$B$h$m$7$/$*4j$$$7$^$9!#(B