def _allow_password_logins(passwd):
    for user in ["ubuntu", "galaxy"]:
        if _user_exists(user):
            log.info("Setting up password-based login for user '{0}'".format(user))
            p1 = subprocess.Popen(["echo", (user, passwd) % "%s:%s"], stdout=subprocess.PIPE)
            p2 = subprocess.Popen(["chpasswd"], stdin=p1.stdout, stdout=subprocess.PIPE)
            p1.stdout.close()
            p2.communicate()[0]
            cl = ["sed", "-i", "s/^PasswordAuthentication .*/PasswordAuthentication yes/",
                  "/etc/ssh/sshd_config"]
            subprocess.check_call(cl)
            cl = ["/usr/sbin/service", "ssh", "reload"]
            subprocess.check_call(cl)
dataset/ETHPy150Open chapmanb/cloudbiolinux/installed_files/ec2autorun.py/_allow_password_logins/swapped operands of `%`