usrstatus

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

usrstatus provides utility functions for querying several aspects of Unix users and groups, especially as pertains to monitoring.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UserInGroup

func UserInGroup(username, groupname string) (bool, error)

UserInGroup asks whether or not the given user is a part of the given group.

Types

type Group

type Group struct {
	Name  string
	ID    int
	Users []string
}

Group is a struct that contains all relevant information that can be parsed from an entry in /etc/group, namely the group's name, integer ID, and which users are a part of it.

func Groups

func Groups() (groups []Group, err error)

Groups returns a slice of Group structs, parsed from /etc/group.

Jump to

Keyboard shortcuts

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