Password handlers

class clacks.agent.plugins.password.interface.PasswordMethod

The interface all password-methods should use.

generate_password_hash(new_password, method=None)

Generates a password hash for the given password and method

get_hash_names()

Returns a list of hashing-mechanisms that are supported by the password method.

isLockable(hash_value)

Tells whether the password hash can be locked or not

isUnlockable(hash_value)

Tells whether the password hash can be unlocked or not

is_locked(hash_value)

Checks whether the account is locked or not.

is_responsible_for_password_hash(password_hash)

Checks whether this class is responsilbe for this kind of password hashes of not.

lock_account(hash_value)

Locks the given account.

unlock_account(hash_value)

Unlocks the given account.


class clacks.agent.plugins.password.manager.PasswordManager

Manager password changes

detect_method_by_hash(hash_value)

Tries to find a password-method that is responsible for this kind of hashes

static get_instance()

Returns an instance of this object

get_method_by_method_type(method_type)

Returns the passwod-method that is responsible for the given hashing-method, e.g. get_method_by_method_type(‘crypt/blowfish’)

listPasswordMethods()

Note

This method will be exported by the CommandRegistry.

Returns a list of all available password methods

list_methods()

Return a list of all useable password-hashing methods

lockAccountPassword(user, object_dn)

Note

This method will be exported by the CommandRegistry.

Locks the account password for the given DN

setUserPassword(user, object_dn, password)

Note

This method will be exported by the CommandRegistry.

Set a new password for a user

setUserPasswordMethod(user, object_dn, method, password)

Note

This method will be exported by the CommandRegistry.

Changes the used password encryption method

unlockAccountPassword(user, object_dn)

Note

This method will be exported by the CommandRegistry.

Unlocks the account password for the given DN


class clacks.agent.plugins.password.crypt_password.PasswordMethodCrypt

Crypt password method. It support the following hashing-methods:

  • crypt/standard-des
  • crypt/enhanced-des
  • crypt/md5
  • crypt/blowfish
detect_hash_method(password_hash)

See PasswordMethod Interface for details

generate_password_hash(new_password, method=None)

See PasswordMethod Interface for details

get_hash_names()

See PasswordMethod Interface for details

isLockable(hash_value)

See PasswordMethod Interface for details

isUnlockable(hash_value)

See PasswordMethod Interface for details

is_locked(password_hash)

See PasswordMethod Interface for details

is_responsible_for_password_hash(password_hash)

See PasswordMethod Interface for details

lock_account(password_hash)

See PasswordMethod Interface for details

unlock_account(password_hash)

See PasswordMethod Interface for details