Use authentication when grabbing password data

This commit is contained in:
Michael McGrath 2008-02-28 11:48:10 -06:00
parent e89c3f53df
commit f0dacb5893
3 changed files with 12 additions and 3 deletions

View file

@ -66,6 +66,7 @@ class MakeShellAccounts(BaseClient):
file = open('/tmp/shadow.txt', 'w')
if not people:
people = self.people_list()
print people
for person in people:
uid = person['id']
username = person['username']
@ -170,7 +171,11 @@ class MakeShellAccounts(BaseClient):
if __name__ == '__main__':
fas = MakeShellAccounts(FAS_URL, 'admin', None, None)
try:
fas = MakeShellAccounts(FAS_URL, 'admin', 'admin', 1)
except AuthError, e:
print e
sys.exit(1)
fas.make_group_db()
fas.make_passwd_db()
fas.make_shadow_db()