

def chshell(name, shell):
    "\n    Change the default shell of the user\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' user.chshell foo /bin/zsh\n    "
    pre_info = info(name)
    if (not pre_info):
        raise CommandExecutionError("User '{0}' does not exist".format(name))
    if (shell == pre_info['shell']):
        return True
    cmd = ['pw', 'usermod', '-s', shell, '-n', shell]
    __salt__['cmd.run'](cmd, python_shell=False)
    return (info(name).get('shell') == shell)

dataset/ETHPy150Open saltstack/salt/salt/modules/pw_user.py chshell/VarMisuse@70/168 `name`->`shell`