Garbage in the passwd file

hi everyone
I have just checked my /etc/passwd file and see that there is
A lot of waste that I don’t know what to do with it
there is a git error report that describes errors and points in the direction of ‘coredump’ with a link to arch. I don’t understand the problem and would like some guidance?

git topic

nixbld1:x:30001:30000:Nix build user 1:/var/empty:/run/current-system/sw/bin/nologin
nixbld2:x:30002:30000:Nix build user 2:/var/empty:/run/current-system/sw/bin/nologin
nixbld3:x:30003:30000:Nix build user 3:/var/empty:/run/current-system/sw/bin/nologin
nixbld4:x:30004:30000:Nix build user 4:/var/empty:/run/current-system/sw/bin/nologin
nixbld5:x:30005:30000:Nix build user 5:/var/empty:/run/current-system/sw/bin/nologin
nixbld6:x:30006:30000:Nix build user 6:/var/empty:/run/current-system/sw/bin/nologin
nixbld7:x:30007:30000:Nix build user 7:/var/empty:/run/current-system/sw/bin/nologin
nixbld8:x:30008:30000:Nix build user 8:/var/empty:/run/current-system/sw/bin/nologin
nixbld9:x:30009:30000:Nix build user 9:/var/empty:/run/current-system/sw/bin/nologin
nixbld10:x:30010:30000:Nix build user 10:/var/empty:/run/current-system/sw/bin/nologin
nixbld11:x:30011:30000:Nix build user 11:/var/empty:/run/current-system/sw/bin/nologin
nixbld12:x:30012:30000:Nix build user 12:/var/empty:/run/current-system/sw/bin/nologin
nixbld13:x:30013:30000:Nix build user 13:/var/empty:/run/current-system/sw/bin/nologin
nixbld14:x:30014:30000:Nix build user 14:/var/empty:/run/current-system/sw/bin/nologin
nixbld15:x:30015:30000:Nix build user 15:/var/empty:/run/current-system/sw/bin/nologin
nixbld16:x:30016:30000:Nix build user 16:/var/empty:/run/current-system/sw/bin/nologin
nixbld17:x:30017:30000:Nix build user 17:/var/empty:/run/current-system/sw/bin/nologin
nixbld18:x:30018:30000:Nix build user 18:/var/empty:/run/current-system/sw/bin/nologin
nixbld19:x:30019:30000:Nix build user 19:/var/empty:/run/current-system/sw/bin/nologin
nixbld20:x:30020:30000:Nix build user 20:/var/empty:/run/current-system/sw/bin/nologin
nixbld21:x:30021:30000:Nix build user 21:/var/empty:/run/current-system/sw/bin/nologin
nixbld22:x:30022:30000:Nix build user 22:/var/empty:/run/current-system/sw/bin/nologin
nixbld23:x:30023:30000:Nix build user 23:/var/empty:/run/current-system/sw/bin/nologin
nixbld24:x:30024:30000:Nix build user 24:/var/empty:/run/current-system/sw/bin/nologin
nixbld25:x:30025:30000:Nix build user 25:/var/empty:/run/current-system/sw/bin/nologin
nixbld26:x:30026:30000:Nix build user 26:/var/empty:/run/current-system/sw/bin/nologin
nixbld27:x:30027:30000:Nix build user 27:/var/empty:/run/current-system/sw/bin/nologin
nixbld28:x:30028:30000:Nix build user 28:/var/empty:/run/current-system/sw/bin/nologin
nixbld29:x:30029:30000:Nix build user 29:/var/empty:/run/current-system/sw/bin/nologin
nixbld30:x:30030:30000:Nix build user 30:/var/empty:/run/current-system/sw/bin/nologin
nixbld31:x:30031:30000:Nix build user 31:/var/empty:/run/current-system/sw/bin/nologin
nixbld32:x:30032:30000:Nix build user 32:/var/empty:/run/current-system/sw/bin/nologin
nobody:x:65534:65534:Unprivileged account (don’t use!):/var/empty:/run/current-system/sw/bin/nologin

What problem are you experiencing? Is it just that you’d like /etc/passwd to not have entries for those nix builder accounts?

2 Likes

You can use nix.settings.auto-allocate-uids = true; to keep the builder out of /etc/passwdand rely on systemdUID auto-allocation for builders.

1 Like

I haven’t had any major problems with my nixos installation, but there have been some files in the download folder called .part file that I deleted and it seems that I have forgotten my root password or am not getting it typed correctly, that’s why I looked at the passwd file.

is “nix.settings.auto-allocate-uids = true;" for the configuration.nix?

Yes. Not sure why it’s not documented in NixOS Search yet. Probably an omission.

That’s because it’s a freeform module:

But also note that auto-allocate-uids is still experimental.

2 Likes

is it safe to delete the garbage from the passwd file?

It’s not garbage. These are useds used by nix-buildto isolate built packages from one another. You will break your system if you delete them manually.

2 Likes

yes OK and thanks for the help

I added “nix.settings.auto-allocate-uids = true;" to the bottom of configuration.nix and it gave some errors, so here’s the whole story

sudo nixos-rebuild switch --upgrade
unpacking 1 channels...
building Nix...
building the system configuration...
evaluation warning: The option `hardware.pulseaudio' defined in `/etc/nixos/configuration.nix' has been renamed to `services.pulseaudio'.


error: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
copying path '/nix/store/025sr32f1bbzvfwvj80ybnmq4hil58ri-make-binary-wrapper-hook' from 'https://cache.nixos.org'...
copying path '/nix/store/iw8i9xxh37lhx7sg2pmnw54gmmvcvd2w-make-shell-wrapper-hook' from 'https://cache.nixos.org'...
building '/nix/store/cjxqwj5j17fvlp52xll39hyz5db5b6pa-unit-pipewire-pulse.socket-disabled.drv'...
building '/nix/store/1kj7ybbmsmbb8dga31ccrgf5v60nxhjv-unit-pipewire.service-disabled.drv'...
building '/nix/store/7wgp4c9q3f0bp44b59h0mn6kymmzlmm2-unit-pipewire.socket-disabled.drv'...
building '/nix/store/dl4w7m8g5l197yjgq8cbv9i9am78krr4-unit-wireplumber.service-disabled.drv'...
error: builder for '/nix/store/0p2763yq6d1c280mqj495rahxpgkdk99-nix.conf.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/b99lg8gydfqylva28hj2hm0il5ygcyfi-etc.drv' failed to build
error: 1 dependencies of derivation '/nix/store/9rq7ak1fn6f1mqx6a0v1gisx0pasav6g-nixos-system-nixos-25.05.813814.ac62194c3917.drv' failed to build

there after

sudo nix-store --verify --check-contents --repair
reading the Nix store…
checking path existence…
checking link hashes…
checking store hashes…

after which I # out “” and nisos-rebuild with the following result

sudo nixos-rebuild switch --upgrade
unpacking 1 channels…
building Nix…
building the system configuration…
evaluation warning: The option hardware.pulseaudio' defined in /etc/nixos/configuration.nix’ has been renamed to `services.pulseaudio’.
activating the configuration…
setting up /etc…
reloading user units for hans…
restarting sysinit-reactivation.target
the following new units were started: NetworkManager-dispatcher.service, sysinit-reactivation.target, systemd-tmpfiles-resetup.service
Done. The new configuration is /nix/store/8bcpch8rb63kiqg1ddldzz0i4pz7kqsj-nixos-system-nixos-25.05.813814.ac62194c3917

any comments

You will also need to add experimental-features = auto-allocate-uid to /etc/nix/nix.conf. I’m doing it this way via configuration.nix:

nix.extraOptions = ''
    # enable auto-allocate-uids to avoid a bunch of /etc/passwd entries
    experimental-features = auto-allocate-uids
'';

I’ve looked at “/etc/nix/nix.conf” and can see that there is a warning against editing the file, so the decision is to do nothing
the lines that are in passwd are allowed to stay they are not in the way! :melting_face:

Of course you wouldn’t hand-edit the file. (the real path of it is located in /nix/store/) You should configure nix.** in your NixOS config instead, as suggested. That’s what the warning is about.

I overlooked the possibility at first, but now it’s okay, I’ve also fixed the “services.pulseaudio” problem.:smiling_face_with_sunglasses:

Those files are created by your browser while it’s downloading. They are slowly being written to, and will be renamed to remove the .part when the browser has finished downloading.

If you shut down the browser without letting it clean up after itself (e.g. by ripping out the power cord or with kill -9), sometimes those files will stick around.

Yes, exactly. You can activate that experimental feature if you want to, but it’s not necessary, and it is experimental. It’s unlikely to cause issues, but make sure to point out you have this enabled if you do end up running into problems.


Do you have any actual issues you were trying to solve by removing these entries or is the thread solved?

1 Like

the files called .part appear in the context of me downloading a file document.pdf from the Maria DB server. the problem that has been with the .part files is as I see it solved I have deleted the files and they have not appeared since.

TLATER\:

Do you have any actual issues you were trying to solve by removing these entries or is the thread solved?

there are no problems with the desktop, I looked through the passwd file to see how I had activated root, and I only have sudo as I see it, it is obvious if you are mistaken about not remembering what you installed :upside_down_face: