Documentation
¶
Overview ¶
Package users support all common action on the system for user handling.
Index ¶
- Variables
- type Config
- type GroupEntry
- type GroupInfo
- type Manager
- func (m *Manager) AllGroups() ([]GroupEntry, error)
- func (m *Manager) AllShadows() ([]ShadowEntry, error)
- func (m *Manager) AllUsers() ([]UserEntry, error)
- func (m *Manager) BrokerForUser(username string) (string, error)
- func (m *Manager) GenerateGID(str string) uint32
- func (m *Manager) GenerateUID(str string) uint32
- func (m *Manager) GroupByID(gid uint32) (GroupEntry, error)
- func (m *Manager) GroupByName(groupname string) (GroupEntry, error)
- func (m *Manager) ShadowByName(username string) (ShadowEntry, error)
- func (m *Manager) Stop() error
- func (m *Manager) UpdateBrokerForUser(username, brokerID string) error
- func (m *Manager) UpdateUser(u UserInfo) (err error)
- func (m *Manager) UserByID(uid uint32) (UserEntry, error)
- func (m *Manager) UserByName(username string) (UserEntry, error)
- type NoDataFoundError
- type ShadowEntry
- type UserEntry
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
var DefaultConfig = Config{
UIDMin: 1000000000,
UIDMax: 1999999999,
GIDMin: 1000000000,
GIDMax: 1999999999,
}
DefaultConfig is the default configuration for the user manager.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
UIDMin uint32 `mapstructure:"uid_min"`
UIDMax uint32 `mapstructure:"uid_max"`
GIDMin uint32 `mapstructure:"gid_min"`
GIDMax uint32 `mapstructure:"gid_max"`
}
Config is the configuration for the user manager.
type GroupEntry ¶
GroupEntry is the group information sent to the NSS service.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the manager for any user related operation.
func NewManager ¶
NewManager creates a new user manager.
func (*Manager) AllGroups ¶
func (m *Manager) AllGroups() ([]GroupEntry, error)
AllGroups returns all groups.
func (*Manager) AllShadows ¶
func (m *Manager) AllShadows() ([]ShadowEntry, error)
AllShadows returns all shadow entries.
func (*Manager) BrokerForUser ¶
BrokerForUser returns the broker ID for the given user.
func (*Manager) GenerateGID ¶
GenerateGID deterministically generates an ID between from the given string, ignoring case, in the range [GIDMin, GIDMax]. The generated ID is *not* guaranteed to be unique.
func (*Manager) GenerateUID ¶
GenerateUID deterministically generates an ID between from the given string, ignoring case, in the range [UIDMin, UIDMax]. The generated ID is *not* guaranteed to be unique.
func (*Manager) GroupByID ¶
func (m *Manager) GroupByID(gid uint32) (GroupEntry, error)
GroupByID returns the group information for the given group ID.
func (*Manager) GroupByName ¶
func (m *Manager) GroupByName(groupname string) (GroupEntry, error)
GroupByName returns the group information for the given group name.
func (*Manager) ShadowByName ¶
func (m *Manager) ShadowByName(username string) (ShadowEntry, error)
ShadowByName returns the shadow information for the given user name.
func (*Manager) UpdateBrokerForUser ¶
UpdateBrokerForUser updates the broker ID for the given user.
func (*Manager) UpdateUser ¶
UpdateUser updates the user information in the cache.
type NoDataFoundError ¶
type NoDataFoundError = cache.NoDataFoundError
NoDataFoundError is the error returned when no entry is found in the cache.
type ShadowEntry ¶
type ShadowEntry struct {
Name string
LastPwdChange int
MaxPwdAge int
PwdWarnPeriod int
PwdInactivity int
MinPwdAge int
ExpirationDate int
}
ShadowEntry is the shadow information sent to the NSS service.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cache handles transaction with an underlying database to cache user and group information.
|
Package cache handles transaction with an underlying database to cache user and group information. |
|
testutils
Package cachetestutils export cache test functionalities used by other packages.
|
Package cachetestutils export cache test functionalities used by other packages. |
|
Package localgroups handles the synchronization of local groups the users.
|
Package localgroups handles the synchronization of local groups the users. |
|
testutils
Package localgrouptestutils export users test functionalities used by other packages to change cmdline and group file.
|
Package localgrouptestutils export users test functionalities used by other packages to change cmdline and group file. |
|
Package userstestutils export cache test functionalities used by other packages.
|
Package userstestutils export cache test functionalities used by other packages. |