On this page
End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
Etc::Passwd
Passwd is a placeholder Struct for user database on Unix systems.
The struct contains the following members
- name
-
contains the short login name of the user as a
String. - passwd
-
contains the encrypted password of the user as a
String. an'x'is returned if shadow passwords are in use. An'*'is returned if the user cannot log in using a password. - uid
-
contains the integer user ID (uid) of the user.
- gid
-
contains the integer group ID (gid) of the user’s primary group.
- dir
-
contains the path to the home directory of the user as a
String. - shell
-
contains the path to the login shell of the user as a
String.
The following members below are system-dependent
- gecos
-
contains a longer
Stringdescription of the user, such as a full name. Some Unix systems provide structured information in the gecos field, but this is system-dependent. - change
-
password change time(integer).
- quota
-
quota value(integer).
- age
-
password age(integer).
- class
-
user access class(string).
- comment
-
comment(string).
- expire
-
account expiration time(integer).