From 70aab7d76dd77562b2bd164f109e0cd30cfa56aa Mon Sep 17 00:00:00 2001 From: Juliana Motira Date: Thu, 20 Aug 2015 11:34:46 -0300 Subject: [PATCH] Add disable user command Change-Id: Ibdbdaa30677b916899b970b4923a65986334f7f6 --- pyghmi/ipmi/command.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pyghmi/ipmi/command.py b/pyghmi/ipmi/command.py index 54b10b4c..167d2f5f 100644 --- a/pyghmi/ipmi/command.py +++ b/pyghmi/ipmi/command.py @@ -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