@task
def create_users():
    """Create project user and developer users."""
    ssh_dir = u"/home/%s/.ssh" % env.project_user
    system.create_user(env.project_user, groups=['www-data', 'login', ])
    sudo('mkdir -p %s' % ssh_dir)
    user_dir = os.path.join(CONF_ROOT, "users")
    for username in os.listdir(user_dir):
        key_file = os.path.normpath(os.path.join(user_dir, username))
        system.create_user(username, groups=['dev', 'login', 'admin', ], key_file=key_file)
        with open(key_file, 'rt') as f:
            ssh_key = f.read()
        # Add ssh key for project user
        files.append('%s/authorized_keys' % ssh_dir, ssh_key, use_sudo=True)
    sudo('chown -R %s:%s %s' % (env.project_user, env.project_user, ssh_dir))
dataset/ETHPy150Open python/raspberryio/fabfile.py/create_users/original