Skip to content

Can't change user shell #1209

@tedbyron

Description

@tedbyron
-sh-3.2$ cat /etc/shells
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/dash
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

# List of shells managed by nix.
/run/current-system/sw/bin/bash
/run/current-system/sw/bin/zsh

-sh-3.2$ echo $SHELL
/run/current-system/sw/bin/zsh

-sh-3.2$ dscl . -read /users/ted/ UserShell
UserShell: /run/current-system/sw/bin/zsh

-sh-3.2$ echo $0
-sh

Both dscl and $SHELL show the correct shell but any time I open a new shell it uses apple bash. Any idea why this could be happening? I'm using programs.zsh and have users.users.ted.shell = pkgs.zsh. chsh also doesn't do anything because it's already set to the correct shell but running the wrong one

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions