mirror of
https://opendev.org/x/pyghmi
synced 2025-01-28 11:57:34 +00:00
Add disable user command
Change-Id: Ibdbdaa30677b916899b970b4923a65986334f7f6
This commit is contained in:
parent
59355018c4
commit
70aab7d76d
@ -1488,3 +1488,17 @@ class Command(object):
|
||||
# that the deletion did not go as planned for now
|
||||
self.set_user_name(uid, '\xff' * 16)
|
||||
return True
|
||||
|
||||
def disable_user(self, uid, mode):
|
||||
"""Disable User
|
||||
|
||||
Just disable the User.
|
||||
This will not disable the password or revoke privileges.
|
||||
|
||||
:param uid: user number [1:16]
|
||||
:param mode:
|
||||
disable = disable user connections
|
||||
enable = enable user connections
|
||||
"""
|
||||
self.set_user_password(uid, mode)
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user