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

Hi! I’ve installed Guix system using System Crafter’s Guix Installer CI build , and then did a reconfigure based on David’s dotfiles code adapted for my home server Regina. 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)

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

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

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.

is this right after opening the terminl?

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

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.

Then I suspect it to be a pam issue.