Open Andy3153 opened 5 months ago
Is there any known workaround for this? My whole nixos-system is broken since the last unstable-update (all generations are unable to boot) and I can't rebuild my system due to this bug.
and I can't rebuild my system due to this bug.
Does
export SUDO_USER=
nixos-rebuild boot
(yes, empty SUDO_USER) do anything?
What does sudo have to do with it though? On my config, I have sudo disabled and doas enabled instead and it still happens. It's about su
What does sudo have to do with it though? On my config, I have sudo disabled and doas enabled instead and it still happens. It's about su
It doesn't have anything to do with sudo (except PAM), I was replying to that specific comment ("and I can't rebuild my system due to this bug.").
I see the same error with sudo
in a nixos-enter, and I also couldn't rebuild my system until I did export SUDO_USER=
since nixos-rebuild uses sudo
as long as you have a non-empty SUDO_USER.
I just reinstalled my whole system with nixos-install --flake <bla>
. Well, that worked at least...
What does sudo have to do with it though? On my config, I have sudo disabled and doas enabled instead and it still happens. It's about su
It doesn't have anything to do with sudo (except PAM), I was replying to that specific comment ("and I can't rebuild my system due to this bug.").
I see the same error with
sudo
in a nixos-enter, and I also couldn't rebuild my system until I didexport SUDO_USER=
since nixos-rebuild usessudo
as long as you have a non-empty SUDO_USER.
I had the same issue and adding export SUDO_USER=
before my nixos-rebuild does workaround the PAM error I was seeing, and let me rebuild within a nixos-enter chroot successfully.
Describe the bug
su
does not work while chrooting into any NixOS installation, even if it has only the bare minimum installed, it's clean, it's brand new etc.Steps To Reproduce
Steps to reproduce the behavior:
nixos-enter
su
Expected behavior
I can run the
su
command normally. Any other distro that I've chrooted into I was able to switch to another user.Screenshots
Additional context
By the way, ignore I need to manually set
$PATH
, that’s another issue I found, but at least I worked around it.Also, I want to do this because I want to run some commands post-installation to clone some Git repos in my
$HOME
and I also want to enable Home Manager for my user (I use the standalone installation). Basically my use case is usesu
to switch users to someone that isn't root.I've posted this on other sites before: 1 2
Notify maintainers
nixos-enter
doesn't appear on search.nixos.org. Taking maintainer from manpage: @edolstracoreutils
forchroot
: @dasJsu
doesn't seem to have any maintainers.Metadata
Basically what you'd get on the latest 23.11 image, because that's where I'm running this. I want to run it post-install, before first boot.
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.Add a :+1: reaction to issues you find important.