Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserManager ¶
type UserManager interface { AddUser(username, homeDir, shell string, createHome, isSystem bool, groups, args []string) (string, []string) RemoveUser(username string) (string, []string) ModifyUser(username, homeDir, shell string, groups []string) (string, []string) // Modify password uses chpasswd for Linux systems to build the command to change the password // Should return a password as the last argument // TODO: refactor when adding more systems instead of Linux ModifyPassword(username, password string) (string, *strings.Reader, string) UserExists(username string) (string, []string) }
UserManager defines the interface for user management operations. All functions but one return a string for the command and any args.
func NewUserManager ¶
func NewUserManager(system string) (UserManager, error)
NewUserManager returns a UserManager-compatible struct
Click to show internal directories.
Click to hide internal directories.