[PATCH phosphor-networkd] Fix for user change password

OpenBMC Patches openbmc-patches at stwcx.xyz
Sat Feb 13 04:00:42 AEDT 2016


From: Adriana Kobylak <anoo at us.ibm.com>

Fix to allow to change the user password
---
 userman.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/userman.py b/userman.py
index 033d3d1..0488d10 100755
--- a/userman.py
+++ b/userman.py
@@ -38,12 +38,12 @@ OBJ_NAME_USER = '/org/openbmc/UserManager/User'
 '''
 
 userman_providers = {
-	'pam' : { 
-		'adduser' : 'user add',
-	},
-	'ldap' : {
-		'adduser' : 'ldap command to add user',
-	},	
+    'pam' : { 
+        'adduser' : 'user add',
+    },
+    'ldap' : {
+        'adduser' : 'ldap command to add user',
+    },  
 }
 
 class UserManGroups (dbus.service.Object):
@@ -207,7 +207,7 @@ class UserManUser (dbus.service.Object):
     def Passwd (self, username, passwd):
         if not username : return 1
         
-        users = self.UserList ()
+        users = Usersobj.UserList ()
         if username not in users : return 1
 
         cmd = "passwd" + " " + username
@@ -218,7 +218,7 @@ class UserManUser (dbus.service.Object):
         proc.sendline (passwd)
 
         proc.wait()
-        return r
+        return 0
 
 def main():
     dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
@@ -246,3 +246,4 @@ def main():
 
 if __name__ == '__main__':
     sys.exit(main())
+
-- 
2.7.1




More information about the openbmc mailing list