Use authentication when grabbing password data
This commit is contained in:
parent
e89c3f53df
commit
f0dacb5893
3 changed files with 12 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue