spwd

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package spwd provides some functions to query the shadow database of a UNIX system.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Spwd

type Spwd struct {
	Namp   string
	Pwdp   string
	Lstchg time.Time
	Min    int
	Max    int
	Warn   int
	Inact  int
	Expire time.Time
}

Spwd represents a record in the shadow database.

func Getspall

func Getspall() ([]*Spwd, error)

Getspall returns all the records in the shadow database.

func Getspnam

func Getspnam(name string) (*Spwd, error)

Getspnam looks up the shadow database and returns the record matching the given user name. If no record is found, it returns (nil, nil). It is the equivalent of the C function getspnam.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL