From bae541329df6f73fac18d188b594014396cac715 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Thu, 16 Dec 2004 18:20:34 +0000 Subject: update comments and move to single repo (Logical change 1.162) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@720 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Generators/Account.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/Server/Generators/Account.py b/src/lib/Server/Generators/Account.py index 7929fc5b7..06554da07 100644 --- a/src/lib/Server/Generators/Account.py +++ b/src/lib/Server/Generators/Account.py @@ -7,7 +7,7 @@ class Account(Generator): '''This module generates account config files, based on an internal data repo: static.(passwd|group|limits.conf) -> static entries - dyn.(passwd|group) -> dynamic entries (usually acquired from yp) + dyn.(passwd|group) -> dynamic entries (usually acquired from yp or somesuch) useraccess -> users to be granted login access on some hosts superusers -> users to be granted root privs on all hosts rootlike -> users to be granted root privs on some hosts @@ -24,7 +24,6 @@ class Account(Generator): '/root/.ssh/authorized_keys':self.gen_root_keys_cb}} try: self.repository = DirectoryBacked(self.data, self.core.fam) - self.ssh = DirectoryBacked("%s/ssh"%(self.data), self.core.fam) except: self.LogError("Failed to load repos: %s, %s" % (self.data, "%s/ssh" % (self.data))) raise GeneratorInitError @@ -55,7 +54,9 @@ class Account(Generator): superusers += [user for (user, host) in rootlike if host == metadata.hostname] data = '' for user in superusers: - if self.ssh.entries.has_key(user): - data += self.ssh.entries[user].data + if self.repository.entries.has_key("%s.key", user): + data += self.repository.entries["%s.key" % user].data + else: + self.LogError("Unable to locate key for user %s" % user) entry.attrib.update({'owner':'root', 'group':'root', 'perms':'0600'}) entry.text = data -- cgit v1.2.3-1-g7c22