package
1.1.0
Repository: https://github.com/inpher/sb.git
Documentation: pkg.go.dev

# Functions

AddAccountInGroup adds an account in a group's membership group.
AddGroup creates a new group on the system.
AddUser creates a new user on the system.
ArchiveHomeSkelleton moves user home to home.bak.
Bcrypt_pbkdfKey derives a key from the password, salt and rounds count, returning a []byte of length keyLen that can be used as cryptographic key.
CheckStringPK checks if the provided public key is valid and not already present in the optional keys slice.
No description provided by the author
CreateHomeSkeleton creates user home.
No description provided by the author
DeleteAccount deletes a group from the system.
DeleteGroup deletes a group from the system.
No description provided by the author
FillUserAuthorizedKeysFile creates the .ssh directory, put the public key in the authorized_keys file and chmods everything.
No description provided by the author
No description provided by the author
GetEtcGroupFilePath returns /etc/group or an other specifically set filepath.
GetEtcPasswdFilePath returns /etc/passwd or an other specifically set filepath.
No description provided by the author
No description provided by the author
GetRandomStrings returns x random strings of y characters.
GetScpScript returns the user's SCP script.
No description provided by the author
GetSystemGroups returns the content of /etc/group.
GetSystemGroups returns the content of /etc/passwd.
GetTOTPFile returns the user's TOTP file.
MarshalPrivateKey returns a PEM block with the private key serialized in the OpenSSH format.
MarshalPrivateKeyWithPassphrase returns an encrypted PEM block with the private key serialized in the OpenSSH format.
ParseArguments parses the os.Args arguments.
ParseArguments parses the os.Args arguments.
ParseCommandLine parses the string passed to us by SSH to an array of args.
No description provided by the author
No description provided by the author
No description provided by the author
RemoveAccountFromGroup adds an account in a group's membership group.
No description provided by the author
SetEtcGroupFilePath sets a specific filepath to oveerride /etc/group (mainly for tests purposes).
SetEtcPasswdFilePath sets a specific filepath to oveerride /etc/passwd (mainly for tests purposes).
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

Helper describes the basic properties of a sb Helper type.
PublicKey describes the basic properties of a sb PublicKey type.
No description provided by the author
SSHKeyPair describes an SSH key pair.
SSHSession represents an SSH session.