Admin account (root access) with GNOME

The login screen does not offer the option to log in to the admin account. When installing NixOS, I set up the admin password as different to the usual login password.

I want to open the config file, but as I understand, the user I am logged in as does not have access to root. This is my first time using both NixOS and GNOME.

Use sudoedit/sudo -e in a terminal to open the file.

In the long run it makes some things easier to moving it to a user writeable location and use regular tools to edit it while keeping a symlink in /etc/nixos/configuration.nix that points to your actual configuration.

Alternatives are to always manually pass -I nixos-config=/actual/path/to/configuration.nix or creating an equivalent entry in NIX_PATH environment variable

1 Like

Thank you! I am very new to this.

Seeing that after I used the command sudo the system asked me the user password and not the admin password, I now don’t understand what the admin password is needed for.

To actually log in as root.

Though you should never do that.

Some even set roots entry in /etc/shadow to ! forbidding any interactive login for that user, but still allows for impersonation using su or elevation using sudo.

1 Like