From 1ab1c8d37411d7a771dfb3eccb34ef34def4f7c5 Mon Sep 17 00:00:00 2001 From: Nigel Metheringham Date: Sun, 4 Nov 2012 09:54:50 +0000 Subject: [PATCH] Take SHADOWFILE from existing user object rather than class --- library/user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/user b/library/user index 7bd7c5a89f..961b17b35a 100755 --- a/library/user +++ b/library/user @@ -407,8 +407,8 @@ class User(object): return passwd else: # Read shadow file for user's encrypted password string - if os.path.exists(User.SHADOWFILE) and os.access(User.SHADOWFILE, os.R_OK): - for line in open(User.SHADOWFILE).readlines(): + if os.path.exists(self.SHADOWFILE) and os.access(self.SHADOWFILE, os.R_OK): + for line in open(self.SHADOWFILE).readlines(): if line.startswith('%s:' % self.name): passwd = line.split(':')[1] return passwd