Struct ::passwd::User

Represents a user

Methods

fn new(uid: i64, name: String, group: String, gecos: String) -> User

Create a new User

This is optimised for a system user with sensible defaults.

These defaults are:

  • Home directory: /
  • Shell: /usr/bin/nologin
  • Password: !* (no login)
  • No password expiration/age/warning/etc.
  • No account expiration

Protocols

protocol get
let output = value.uid

Allows a get operation to work.

protocol set
value.uid = input

Allows a set operation to work.

protocol get
let output = value.name

Allows a get operation to work.

protocol set
value.name = input

Allows a set operation to work.

protocol get
let output = value.group

Allows a get operation to work.

protocol set
value.group = input

Allows a set operation to work.

protocol get
let output = value.gecos

Allows a get operation to work.

protocol set
value.gecos = input

Allows a set operation to work.

protocol get
let output = value.home

Allows a get operation to work.

protocol set
value.home = input

Allows a set operation to work.

protocol get
let output = value.shell

Allows a get operation to work.

protocol set
value.shell = input

Allows a set operation to work.

protocol get
let output = value.passwd

Allows a get operation to work.

protocol set
value.passwd = input

Allows a set operation to work.

protocol get
let output = value.change

Allows a get operation to work.

protocol set
value.change = input

Allows a set operation to work.

protocol get
let output = value.min

Allows a get operation to work.

protocol set
value.min = input

Allows a set operation to work.

protocol get
let output = value.max

Allows a get operation to work.

protocol set
value.max = input

Allows a set operation to work.

protocol get
let output = value.warn

Allows a get operation to work.

protocol set
value.warn = input

Allows a set operation to work.

protocol get
let output = value.inact

Allows a get operation to work.

protocol set
value.inact = input

Allows a set operation to work.

protocol get
let output = value.expire

Allows a get operation to work.

protocol set
value.expire = input

Allows a set operation to work.