struct

Libcrown::User

Inherits Struct < Value < Object

Represents a user line of /etc/passwd.

Constructors

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.

Source

Instance methods

full_name

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.

Source
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.

Source
gecos_comment

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

Source
gecos_comment=(gecos_comment : String) : String

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

Source
gid

Primary group ID.

Source
gid=(gid : UInt32)

Primary group ID.

Source
home_directory

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

Source
home_directory=(home_directory : String)

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

Source
login_shell

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

Source
login_shell=(login_shell : String)

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

Source
name

Unique user name.

Source
name=(name : String) : String

Unique user name.

Source
password

Usually hashed password stored in /etc/shadow.

Source
password=(password : PasswordState)

Usually hashed password stored in /etc/shadow.

Source