class 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).
Public Class Methods
(*untyped) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 793
def self.[]: (*untyped) -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 820
def self.each: () -> untyped
Iterates for each entry in the /etc/passwd file if a block is given.
If no block is given, returns the Enumerator.
The code block is passed an Passwd struct.
See Etc.getpwent above for details.
<strong>Example:</strong>
require 'etc' Etc::Passwd.each {|u| puts u.name + " = " + u.gecos } Etc::Passwd.collect {|u| u.gecos} Etc::Passwd.collect {|u| u.gecos}
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 822
def self.inspect: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 824
def self.keyword_init?: () -> untyped
() → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 826
def self.members: () -> untyped
(*untyped) → untyped
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 828
def self.new: (*untyped) -> untyped
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 830
def change: () -> Integer
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 832
def change=: (Integer new_change) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 834
def dir: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 836
def dir=: (String new_dir) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 838
def expire: () -> Integer
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 840
def expire=: (Integer new_expire) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 842
def gecos: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 844
def gecos=: (String new_gecos) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 846
def gid: () -> Integer
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 848
def gid=: (Integer new_gid) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 850
def name: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 852
def name=: (String new_name) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 854
def passwd: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 856
def passwd=: (String new_passwd) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 858
def shell: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 860
def shell=: (String new_shell) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 862
def uclass: () -> String
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 864
def uclass=: (String new_uclass) -> void
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/stdlib/etc/0/etc.rbs, line 866
def uid: () -> Integer