Exemple #1
0
def setUserDetails(username, name=None, password=None, aliases=None):
    debugOutput("Setting details for %s name %s password %s" %
                (username, name, password))

    system.updateUser(username, name=name, password=password)
    if password and username in samba.getUsers():
        samba.setPassword(username, password)
Exemple #2
0
def setAdminPassword(password):
    # Set samba admin password
    samba.setPassword("root", password)
    # Set web interface admin password
    system.run("htpasswd -bc %s '%s' '%s'" % (PASSWORD_FILE, "Administrator", password))
    system.run("chgrp www-data '%s'" % PASSWORD_FILE)
    system.run("chmod 740 '%s'" % PASSWORD_FILE)
Exemple #3
0
def setAdminPassword(password):
    # Set samba admin password
    samba.setPassword("root", password)
    # Set web interface admin password
    system.run("htpasswd -bc %s '%s' '%s'" %
               (PASSWORD_FILE, "Administrator", password))
    system.run("chgrp www-data '%s'" % PASSWORD_FILE)
    system.run("chmod 740 '%s'" % PASSWORD_FILE)
Exemple #4
0
def setUserDetails(username, name=None, password=None, aliases=None):
    debugOutput("Setting details for %s name %s password %s" % (username, name, password))

    system.updateUser(username, name=name, password=password)
    if password and username in samba.getUsers():
        samba.setPassword(username, password)