def __create_new_user(self, username, home_folder, groups, default_script, is_admin):
        is_admin_command = " -G {}".format(self.__get_admin_group())
        command = "useradd -g %(group)s%(is_admin_command)s -s %(default_script)s -d %(home_folder)s -m %(username)s"
        home_folder = home_folder or '/home/%s' % username
        group = groups and groups[0] or username
        self.log("User %s not found! Creating..." % username)
        self.execute(command % {
            'group': group or username,
            'is_admin_command': is_admin and is_admin_command or '',
            'home_folder': home_folder,
            'default_script': default_script,
            'username': username
        }, stdout=False, sudo=True)
        self.log("User %s created!" % username)
dataset/ETHPy150Open python-provy/provy/provy/more/debian/users/user.py/UserRole.__create_new_user/original