class Sys::Admin::User
The User class encapsulates the information found in /etc/passwd.
Attributes
The user's access class.
Used in the past for password aging. Deprecated by /etc/shadow.
Next date a password change will be needed.
Another comment field.
The absolute path name of the user's home directory.
The account's expiration date
TODO: Forgot what this is.
A comment field. Rarely used now.
The user's group ID.
The name of the terminal device the user last logged on with.
The host name from which the user last logged in.
The last time the user logged in.
The user name associated with the account.
The user's encrypted password. Deprecated by /etc/shadow.
The user's alloted amount of disk space.
The user's login shell.
The user's user ID.
Public Class Methods
Creates and returns a User object, which encapsulates the information typically found within an /etc/passwd entry, i.e. a struct passwd.
If a block is provided, yields the object back to the block.
# File lib/sys/admin/common.rb, line 97 def initialize yield self if block_given? end
Public Instance Methods
An array of groups to which the user belongs.
# File lib/sys/admin/common.rb, line 102 def groups array = [] Sys::Admin.groups.each{ |grp| array << grp.name if grp.members.include?(self.name) } array end