sync_users

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthorizedKeysFile = "authorized_keys"
	SSHDir             = ".ssh"
)

Constants AuthorizedKeysFile and the sshdir extension

Variables

This section is empty.

Functions

func GetAllUsers

func GetAllUsers() ([]string, error)

func GetArrayDiff

func GetArrayDiff(k1 []string, k2 []string) []string

Compare the keys to find what keys are missing locally compared to what is in IAM

func Keys

func Keys(l *user.User, kp string, ks []string) error

Loop through the keys and call add key to add key to the box

func New

func New(user string, group string, sgroup string, keys []string) *awsUser

Initiate the user function

func RemoveUser

func RemoveUser(usr string) error

Remove users from system that are not in the group list

Types

type UserList

type UserList struct {
	IgnoredUsers []string
	AwsUsers     []string
	LocalUsers   []string
}

UserList structure to hold the details of aws users, local users and ignored users

func CmpNew

func CmpNew(iams []string, ignore []string) (*UserList, error)

Create a compare structure

func (*UserList) Cleanup

func (u *UserList) Cleanup() error

Clean up any users that are no longer suppose to be on the box

Jump to

Keyboard shortcuts

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