Exemplo n.º 1
0
def work(username, loginShell, homeFolder, password, amendment):
    # creates or deletes
    comments = []
    if sp.main(username, loginShell, homeFolder, password, amendment):
        comments.append('user-ID is created !\n')
        if ss.main(new_user, amendment):
            comments.append('sudo - permissions are created !')
    return ''.join(comments)
Exemplo n.º 2
0
def work(username, loginShell, homeFolder, password, amendment, sudoers):
    # creates or deletes
    comments = []
    if amendment in ['create', 'modify', 'delete'] and \
        sp.main(username, loginShell, homeFolder, password, amendment):
        comments.append('user-ID is created !\n')
        if sudoers == 'yes' and ss.main(new_user, amendment):
            comments.append('sudo - permissions are created !')
    return ''.join(comments)