Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating new user during installation via configuration.nix can't log in after installation #55424

Open
AMDphreak opened this issue Feb 8, 2019 · 7 comments

Comments

@AMDphreak
Copy link

Issue description

Can't login to my user after installing Nixos.
user has a password already set, even though it was not specified. Only way to fix this is to login as root and use passwd myusername.

Steps to reproduce

Edit /mnt/etc/nixos/configuration.nix.
Uncomment section for adding a user. (I also uncommented section for booting KDE at start).
Change username to what you want.
Install NixOS.
Boot NixOS.
Can't login with username. It already has a password.

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

@ghost
Copy link

ghost commented Apr 25, 2020

same happens if you just useradd w/o password

@stale
Copy link

stale bot commented Oct 22, 2020

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 22, 2020
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/normal-user-not-listed-in-gdm/10324/2

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 3, 2020
@lasers
Copy link
Contributor

lasers commented Jan 30, 2021

Is this a PEKBAC issue?

  • "Can't login to my user after installing Nixos." in Issue Description.
  • Steps to reproduce illustrates an user/password was made on live disc before the installation, not after.

@stale
Copy link

stale bot commented Jul 30, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 30, 2021
@Kaligule
Copy link

I had the same problem. It might very well be what @lasers sugested: I created the user while still on the installation medium. From @AMDphreak's description it is clear that this is what he did as well.

I was able to solve it like this (after the finished installation)

  1. try to login as kaligule and fail
  2. login as root
  3. edit the nixos config (nano /etc/nixos/configuration.nix) and comment out the part where the user (kaligule for me) is created
  4. rebuild nixos (nixos-rebuild switch)
  5. just to make sure (don't know if this is needed): log out and reboot: reboot
  6. login as root again
  7. edit the nixos config again, add back the part removed in 3.
  8. like in point 5 (again, not sure if necessary): log out and reboot
  9. log in as kaligule

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 14, 2021
@fczuardi
Copy link

This was happening to me on a new installation on a raspberry pi 4 following the instructions of this wiki page that disables grub in favor of the raspberryPi boot.loader:

  boot.loader.raspberryPi = {
    enable = true;
    version = 4;
  };
  boot.loader.grub.enable = false;

However the configuration.nix generated by the nixos-generate-config command suggests using this one instead:

  # Enables the generation of /boot/extlinux/extlinux.conf
  boot.loader.generic-extlinux-compatible.enable = true;
  boot.loader.grub.enable = false;

And that worked, the generation with the user created on nix-rebuild switch survived a reboot :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants