struct Libcrown::User

Overview

Represents a user line of /etc/passwd.

Defined in:

user.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(name : String, gid : UInt32 = 100_u32, full_name : String = "", gecos_comment : String = "", home_directory : String = "/", login_shell : String = "/bin/false", password : PasswordState = PasswordState::Hashed) #

Creates a new user.


[View source]

Instance Method Detail

def full_name : String #

Name is the user's real or display name. It might be blank. This is the first (or only) entry in the GECOS field list.


[View source]
def full_name=(full_name : String) : String #

Name is the user's real or display name. It might be blank. This is the first (or only) entry in the GECOS field list.


[View source]
def gecos_comment : String #

Comment field to add informations related to the user, excluding the first one (full name).


[View source]
def gecos_comment=(gecos_comment : String) : String #

Comment field to add informations related to the user, excluding the first one (full name).


[View source]
def gid : UInt32 #

Primary group ID.


[View source]
def gid=(gid : UInt32) #

Primary group ID.


[View source]
def home_directory : String #

Absolute path to the directory the user will be in when they log in. Defaults to / if not defined.


[View source]
def home_directory=(home_directory : String) #

Absolute path to the directory the user will be in when they log in. Defaults to / if not defined.


[View source]
def login_shell : String #

Absolute path of a command (/bin/false) or shell (/bin/bash) executed at user's login.


[View source]
def login_shell=(login_shell : String) #

Absolute path of a command (/bin/false) or shell (/bin/bash) executed at user's login.


[View source]
def name : String #

Unique user name.


[View source]
def name=(name : String) : String #

Unique user name.


[View source]
def password : PasswordState #

Usually hashed password stored in /etc/shadow.


[View source]
def password=(password : PasswordState) #

Usually hashed password stored in /etc/shadow.


[View source]