passwd

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupUid

func LookupUid(userName string) (uid int, err error)

LookupUid reads the passwd file and returns the uid of the user specified by userName.

func LookupUidFromFile

func LookupUidFromFile(userName, passwdFile string) (uid int, err error)

LookupUidFromFile reads the passwd file specified by passwdFile, and returns the uid of the user specified by userName.

Types

type User

type User struct {
	Name        string
	Pass        string
	Uid         int
	Gid         int
	Comment     string
	Home        string
	Interpreter string
}

User represents an entry in the passwd file.

Jump to

Keyboard shortcuts

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