# “unable to set working directory: no such file or directory (os error 2)” in each TTY before login

**URL:** <https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399>\
**Category:** Guix\
**Created:** [February 18, 2025, 4:51pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399 "2025-02-18T16:51:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ez3](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/ez3/32/743_2.png) [@Ez3](https://forum.systemcrafters.net/u/Ez3)\
**Post date:** [February 18, 2025, 4:51pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/1 "2025-02-18T16:51:12Z")

</div>

Hi! I’ve installed Guix system using System Crafter’s Guix Installer [CI build](https://github.com/SystemCrafters/guix-installer/releases/download/v202412150202/guix-installer-202412150202.iso) , and then did a `reconfigure` based on David’s dotfiles code adapted for my home server [Regina](https://github.com/stormwatch/Guix-configurations/blob/3a36e36152cb616bd4cfc6c965fde927de6e74ce/daviwil/systems/Regina.scm). I’m facing some problems and I’ll try to write one post for each one of them.

The first thing I noticed is that after the reconfigure every TTY has this text

> unable to set working directory: no such file or directory (os error 2)

before each login prompt.

I’ve been searching the logs but I’m not sure how to investigate this furhter.

In case it helps, here are some logged errors.

/var/log/greetd-1.log:

> 2025-02-16 14:12:19 error: authentication error: pam\_authenticate: AUTH\_ERR  
> 2025-02-16 14:12:19 client loop failed: i/o error: Broken pipe (os error 32)  
> 2025-02-16 17:21:43 error: authentication error: pam\_authenticate: AUTH\_ERR  
> 2025-02-16 17:21:43 client loop failed: i/o error: Broken pipe (os error 32)

---

<div class="post-metadata">

**Author:** ![dgr](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/dgr/32/394_2.png) [@dgr](https://forum.systemcrafters.net/u/dgr)\
**Post date:** [February 18, 2025, 5:24pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/2 "2025-02-18T17:24:43Z")

</div>

What do you get as working directory in the environment variables?

---

<div class="post-metadata">

**Author:** ![Ez3](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/ez3/32/743_2.png) [@Ez3](https://forum.systemcrafters.net/u/Ez3)\
**Post date:** [February 18, 2025, 5:48pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/3 "2025-02-18T17:48:58Z")

</div>

I’m afraid I didn’t understand. The default working directory, I. e. the directory I’m in after login in, is my home directory.

There might be some path in David’s configuration that doesn’t work in mine. One possibility might be that I’ve changed my locale to spanish. I’ll keep looking for some misconfigured path in the configuration.

here’s my env:

> SHELL=/gnu/store/cdwviyfnsfv7k57qrwmym0mrynjixc1i-bash-5.1.16/bin/bash  
> XDG\_CONFIG\_DIRS=/home/Ez3/.guix-home/profile/etc/xdg:/home/Ez3/.guix-profile/etc/xdg:/run/current-system/profile/etc/xdg  
> ZATHURA\_PLUGINS\_PATH=/home/Ez3/.guix-home/profile/lib/zathura  
> CLUTTER\_BACKEND=wayland  
> PASSWORD\_STORE\_SYSTEM\_EXTENSION\_DIR=/home/Ez3/.guix-home/profile/lib/password-store/extensions  
> UDEV\_HWDB\_PATH=/home/Ez3/.guix-home/profile/lib/udev/hwdb.d:/run/current-system/profile/lib/udev/hwdb.d  
> BASH\_LOADABLES\_PATH=/home/Ez3/.guix-home/profile/lib/bash:/run/current-system/profile/lib/bash  
> SSH\_AUTH\_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh  
> EMACSNATIVELOADPATH=/home/Ez3/.guix-home/profile/lib/emacs/native-site-lisp  
> XDG\_DATA\_HOME=/home/Ez3/.local/share  
> LINUX\_MODULE\_DIRECTORY=/run/booted-system/kernel/lib/modules  
> XDG\_CONFIG\_HOME=/home/Ez3/.config  
> XCURSOR\_PATH=/home/Ez3/.guix-home/profile/share/icons:/home/Ez3/.icons:/home/Ez3/.guix-profile/share/icons:/run/current-system/profile/share/icons  
> NM\_VPN\_PLUGIN\_DIR=/gnu/store/bq49plwf161f7fz699dw0377mr8kb16b-network-manager-openvpn-1.10.2/lib/NetworkManager/VPN  
> GDK\_PIXBUF\_MODULE\_FILE=/home/Ez3/.guix-home/profile/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache  
> GTK\_DATA\_PREFIX=/run/current-system/profile  
> EDITOR=emacsclient  
> PWD=/home/Ez3/.bin  
> NIX\_PROFILES=/nix/var/nix/profiles/default /home/Ez3/.nix-profile  
> LOGNAME=Ez3  
> XDG\_SESSION\_TYPE=wayland  
> ECORE\_EVAS\_ENGINE=wayland-egl  
> MANPATH=/home/Ez3/.nix-profile/share/man:/home/Ez3/.guix-home/profile/share/man:/run/current-system/profile/share/man:/home/Ez3/.guix-profile/share/man:/run/current-system/profile/share/man  
> GUILE\_LOAD\_PATH=/run/current-system/profile/share/guile/site/3.0  
> GI\_TYPELIB\_PATH=/home/Ez3/.guix-home/profile/lib/girepository-1.0  
> GIT\_EXEC\_PATH=/home/Ez3/.guix-home/profile/libexec/git-core  
> HOME=/home/Ez3  
> GIT\_SSL\_CAINFO=/run/current-system/profile/etc/ssl/certs/ca-certificates.crt  
> LANG=es\_AR.utf8  
> \_JAVA\_AWT\_WM\_NONREPARENTING=1  
> XDG\_CURRENT\_DESKTOP=sway  
> OBS\_PLUGINS\_DIRECTORY=/home/Ez3/.guix-home/profile/lib/obs-plugins  
> SSL\_CERT\_DIR=/run/current-system/profile/etc/ssl/certs  
> NIX\_SSL\_CERT\_FILE=/etc/ssl/certs/ca-certificates.crt  
> GIO\_EXTRA\_MODULES=/home/Ez3/.guix-home/profile/lib/gio/modules:/run/current-system/profile/lib/gio/modules  
> PROMPT\_COMMAND=set\_bash\_prompt  
> GUILE\_LOAD\_COMPILED\_PATH=/run/current-system/profile/lib/guile/3.0/site-ccache:/run/current-system/profile/share/guile/site/3.0  
> SSH\_CONNECTION=192.168.1.124 58127 192.168.1.125 2222  
> QT\_QPA\_PLATFORM=wayland-egl  
> XDG\_CACHE\_HOME=/home/Ez3/.cache  
> INFOPATH=/home/Ez3/.guix-home/profile/share/info:/home/Ez3/.config/guix/current/share/info:/run/current-system/profile/share/info:/home/Ez3/.guix-profile/share/info:/run/current-system/profile/share/info  
> DICPATH=/home/Ez3/.guix-profile/share/hunspell:/run/current-system/profile/share/hunspell  
> OBS\_PLUGINS\_DATA\_DIRECTORY=/home/Ez3/.guix-home/profile/share/obs/obs-plugins  
> RTC\_USE\_PIPEWIRE=true  
> DBUS\_FATAL\_WARNINGS=0  
> XDG\_SESSION\_CLASS=user  
> TERM=screen-256color  
> XDG\_DESKTOP\_PORTAL\_DIR=/home/Ez3/.guix-home/profile/share/xdg-desktop-portal/portals  
> USER=Ez3  
> SDL\_VIDEODRIVER=wayland  
> TZDIR=/gnu/store/jd1lb67p4mn1mzi5i4w6gj9b3628h7c9-tzdata-2023d/share/zoneinfo  
> VISUAL=emacsclient  
> SHLVL=1  
> MOZ\_ENABLE\_WAYLAND=1  
> XDG\_SESSION\_ID=c3  
> GST\_PLUGIN\_PATH=/home/Ez3/.guix-profile/lib/gstreamer-1.0  
> QML2\_IMPORT\_PATH=/home/Ez3/.guix-home/profile/lib/qt5/qml  
> TERMINFO\_DIRS=/home/Ez3/.guix-home/profile/share/terminfo  
> XDG\_STATE\_HOME=/home/Ez3/.local/state  
> XDG\_RUNTIME\_DIR=/run/user/1000  
> SSL\_CERT\_FILE=/etc/ssl/certs/ca-certificates.crt  
> SSH\_CLIENT=192.168.1.124 58127 2222  
> LIBVA\_DRIVERS\_PATH=/run/current-system/profile/lib/dri  
> GST\_PLUGIN\_SYSTEM\_PATH=/home/Ez3/.guix-home/profile/lib/gstreamer-1.0  
> LC\_COLLATE=C  
> XDG\_DATA\_DIRS=/home/Ez3/.guix-home/profile/share:/run/current-system/profile/share:/home/Ez3/.guix-profile/share:/run/current-system/profile/share:/home/Ez3/.local/share/flatpak/exports/share  
> PATH=/home/Ez3/.nix-profile/bin:/home/Ez3/.bin:/home/Ez3/.npm-global/bin:/home/Ez3/.guix-home/profile/bin:/home/Ez3/.guix-home/profile/sbin:/run/privileged/bin:/home/Ez3/.config/guix/current/bin:/home/Ez3/.guix-profile/bin:/run/current-system/profile/bin:/run/current-system/profile/sbin  
> QMAKEPATH=/home/Ez3/.guix-home/profile/lib/qt5  
> DBUS\_SESSION\_BUS\_ADDRESS=unix:path=/run/user/1000/bus  
> ELM\_ENGINE=wayland\_egl  
> SSH\_TTY=/dev/pts/2  
> VDPAU\_DRIVER\_PATH=/home/Ez3/.guix-home/profile/lib/vdpau  
> QT\_PLUGIN\_PATH=/home/Ez3/.guix-home/profile/lib/qt5/plugins  
> EMACSLOADPATH=/home/Ez3/.guix-home/profile/share/emacs/site-lisp:/run/current-system/profile/share/emacs/site-lisp  
> OLDPWD=/home/Ez3  
> GUIX\_GTK3\_PATH=/home/Ez3/.guix-home/profile/lib/gtk-3.0  
> \_=/run/current-system/profile/bin/env

---

<div class="post-metadata">

**Author:** ![dgr](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/dgr/32/394_2.png) [@dgr](https://forum.systemcrafters.net/u/dgr)\
**Post date:** [February 18, 2025, 5:52pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/4 "2025-02-18T17:52:42Z")

</div>

Type `env` in the terminal and there should be variables like `PWD` and `HOME` in the output.  
Also in your users line in `/etc/passwd` should be the source for the value of `HOME`.

---

<div class="post-metadata">

**Author:** ![dgr](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/dgr/32/394_2.png) [@dgr](https://forum.systemcrafters.net/u/dgr)\
**Post date:** [February 18, 2025, 5:53pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/5 "2025-02-18T17:53:38Z")

</div>

> [@Ez3](#):
>
> PWD=/home/Ez3/.bin

is this right after opening the terminl?

---

<div class="post-metadata">

**Author:** ![Ez3](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/ez3/32/743_2.png) [@Ez3](https://forum.systemcrafters.net/u/Ez3)\
**Post date:** [February 18, 2025, 5:54pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/6 "2025-02-18T17:54:38Z")

</div>

Oh I pasted my env before reading your reply.

The paths in /etc/passwd look ok.

> λcat /etc/passwd  
> root:x:0:0:System administrator:/root:/gnu/store/cdwviyfnsfv7k57qrwmym0mrynjixc1i-bash-5.1.16/bin/bash  
> Ez3:x:1000:998:Ezequiel Birman:/home/Ez3:/gnu/store/cdwviyfnsfv7k57qrwmym0mrynjixc1i-bash-5.1.16/bin/bash  
> nobody:x:65534:997::/nonexistent:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld01:x:981:40000:Nix Build User 1:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld02:x:980:40000:Nix Build User 2:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld03:x:979:40000:Nix Build User 3:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld04:x:978:40000:Nix Build User 4:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld05:x:977:40000:Nix Build User 5:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld06:x:976:40000:Nix Build User 6:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld07:x:975:40000:Nix Build User 7:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld08:x:974:40000:Nix Build User 8:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld09:x:973:40000:Nix Build User 9:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> nixbld10:x:972:40000:Nix Build User 10:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> ntpd:x:989:997:NTP daemon user:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> lp:x:971:989:System user for invoking printing helper programs:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> sshd:x:982:976:sshd privilege separation user:/var/run/sshd:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> messagebus:x:988:983:D-Bus system bus user:/run/dbus:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> polkitd:x:987:982:Polkit daemon user:/var/empty:/run/current-system/profile/sbin/nologin  
> geoclue:x:986:981:GeoClue daemon user:/var/empty:/run/current-system/profile/sbin/nologin  
> avahi:x:984:979:Avahi daemon user:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> greeter:x:970:971::/home/greeter:/gnu/store/cdwviyfnsfv7k57qrwmym0mrynjixc1i-bash-5.1.16/bin/bash  
> oci-container:x:969:972:OCI services account:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder01:x:999:30000:Guix Build User 1:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder02:x:998:30000:Guix Build User 2:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder03:x:997:30000:Guix Build User 3:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder04:x:996:30000:Guix Build User 4:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder05:x:995:30000:Guix Build User 5:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder06:x:994:30000:Guix Build User 6:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder07:x:993:30000:Guix Build User 7:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder08:x:992:30000:Guix Build User 8:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder09:x:991:30000:Guix Build User 9:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin  
> guixbuilder10:x:990:30000:Guix Build User 10:/var/empty:/gnu/store/60f2qp48zdphjvh01zjq99caj2p9ylpb-shadow-4.13/sbin/nologin

---

<div class="post-metadata">

**Author:** ![Ez3](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/ez3/32/743_2.png) [@Ez3](https://forum.systemcrafters.net/u/Ez3)\
**Post date:** [February 18, 2025, 6:03pm UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/7 "2025-02-18T18:03:19Z")

</div>

No. I was in ~/.bin when I typed `env`. Immediately after login in, both `env` and `pwd` return ‘/home/Ez3’.

The error happens before login in.

---

<div class="post-metadata">

**Author:** ![dgr](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.systemcrafters.net/dgr/32/394_2.png) [@dgr](https://forum.systemcrafters.net/u/dgr)\
**Post date:** [February 19, 2025, 7:47am UTC](https://forum.systemcrafters.net/t/unable-to-set-working-directory-no-such-file-or-directory-os-error-2-in-each-tty-before-login/1399/8 "2025-02-19T07:47:38Z")

</div>

Then I suspect it to be a pam issue.
