U:RDoc::NormalModule[iI"Etc:ET@0o:RDoc::Markup::Document: @parts[o;;[o:RDoc::Markup::Paragraph;[I"GThe Etc module provides access to information typically stored in ;TI"1files in the /etc directory on Unix systems.;To:RDoc::Markup::BlankLineo; ;[I"IThe information accessible consists of the information found in the ;TI"K/etc/passwd and /etc/group files, plus information about the system's ;TI"Ctemporary directory (/tmp) and configuration directory (/etc).;T@o; ;[I"MThe Etc module provides a more reliable way to access information about ;TI"Cthe logged in user than environment variables such as +$USER+.;T@S:RDoc::Markup::Heading: leveli: textI" Example:;T@o:RDoc::Markup::Verbatim;[ I"require 'etc' ;TI" ;TI"login = Etc.getlogin ;TI" info = Etc.getpwnam(login) ;TI",username = info.gecos.split(/,/).first ;TI"Aputs "Hello #{username}, I see your login name is #{login}" ;T: @format0o; ;[I"JNote that the methods provided by this module are not always secure. ;TI"HIt should be used for informational purposes, and not for security.;T@o; ;[I"NAll operations defined in this module are class methods, so that you can ;TI",include the Etc module into your class.;T: @fileI"ext/etc/etc.c;T:0@omit_headings_from_table_of_contents_below0;0;0[[U:RDoc::Constant[iI" Passwd;TI"Etc::Passwd;T00o;;[ o; ;[I" Passwd;T@o; ;[I"contains the encrypted password of the user as a String. ;TI"Kan 'x' is returned if shadow passwords are in use. An '*' is returned ;TI"0if the user cannot log in using a password.;To;;[I"uid;T;[o; ;[I"4contains the integer user ID (uid) of the user.;To;;[I"gid;T;[o; ;[I"Econtains the integer group ID (gid) of the user's primary group.;To;;[I"dir;T;[o; ;[I"Econtains the path to the home directory of the user as a String.;To;;[I" shell;T;[o; ;[I"Bcontains the path to the login shell of the user as a String.;T@S; ; i; I"WThe following members below are optional, and must be compiled with special flags:;T@o;;;;[ o;;[I" gecos;T;[o; ;[ I"?contains a longer String description of the user, such as ;TI"Ja full name. Some Unix systems provide structured information in the ;TI"0gecos field, but this is system-dependent. ;TI"8must be compiled with +HAVE_STRUCT_PASSWD_PW_GECOS+;To;;[I" change;T;[o; ;[I"Wpassword change time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_CHANGE+;To;;[I" quota;T;[o; ;[I"Mquota value(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_QUOTA+;To;;[I"age;T;[o; ;[I"Lpassword age(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_AGE+;To;;[I" class;T;[o; ;[I"Ruser access class(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_CLASS+;To;;[I" comment;T;[o; ;[I"Jcomment(string) must be compiled with +HAVE_STRUCT_PASSWD_PW_COMMENT+;To;;[I" expire;T;[o; ;[I"Zaccount expiration time(integer) must be compiled with +HAVE_STRUCT_PASSWD_PW_EXPIRE+;T;@,;0@,@cRDoc::NormalModule0U;[iI" Group;TI"Etc::Group;T00o;;[ o; ;[I" Group;T@o; ;[I"QGroup is a Struct that is only available when compiled with +HAVE_GETGRENT+.;T@o; ;[I"/The struct contains the following members:;T@o;;;;[ o;;[I" name;T;[o; ;[I"0contains the name of the group as a String.;To;;[I" passwd;T;[o; ;[ I"