babashka

borkdude 2026-02-02T16:45:33.894509Z

Are any other people on linux who use the default (static) binary have this problem?

bb -e '(System/getProperty "user.home")'
"?"
I can't repro it, but some people do seem to have it: https://github.com/babashka/bbin/issues/75#issuecomment-3836340842

viesti 2026-02-03T13:18:25.355119Z

I think I ran into a similar thing with docker/jvm when running a container with a user id that is not present in the image

0% docker run -u 1234 --rm --entrypoint bb babashka/babashka:1.12.215-SNAPSHOT -e '(System/getProperty "user.home")'
"?"
vs
0% docker run --rm --entrypoint bb babashka/babashka:1.12.215-SNAPSHOT -e '(System/getProperty "user.home")'
"/root"
it's related to how jvm resolves the user

borkdude 2026-02-03T13:20:55.403609Z

that does make sense, does it?

viesti 2026-02-03T13:29:04.758119Z

found https://stackoverflow.com/a/70023437 with links to jdk17 source code ah now noticed the issue link, possibly different context in the issue, but maybe around same root

borkdude 2026-02-03T13:45:02.712009Z

> I'm not using Docker. I managed to fix the issue using the non-static version, as I mentioned before. If you want, I can run some commands. Please respond in the Github issue if you have anything to add

viesti 2026-02-03T13:45:22.076969Z

yup, thanks 🙂

borkdude 2026-02-02T16:51:24.217209Z

I tested on both Ubuntu 20.04 and 24.04 (WSL2) and got "/home/borkdude"

Jonas Rodrigues 2026-02-02T16:54:44.207769Z

I had this problem, not only in babashka but other software as well. In my case was a combination of using babashka installed via Nix and an user logged in via network login

borkdude 2026-02-02T16:55:01.088999Z

how did you resolve it?

Jonas Rodrigues 2026-02-02T16:59:29.111419Z

On my Nix environment, installed sssd , nix-ld and exposed ${pkgs.sssd}/lib in my LD_LIBRARY_PATH. I'm not a Nix expert, started using it recently on my Ubuntu box. Don't know if that's the right approach, but it worked 😃

🙏 1
Gregory Bleiker 2026-02-02T17:18:39.036689Z

I also use nix and ubuntu (wsl), and it gives me my home dir without problems

Andreas 2026-02-02T17:31:17.111739Z

I could only reproduce it in an LDAP environment (could be that the LDAP was configured in a weird way). Maybe it' because in an LDAP environment the user's home directory comes from a different source (it sure does not come from /etc/oasswd).

lispyclouds 2026-02-02T19:32:37.922509Z

Looks okay on my Fedora with 6.18.8 kernel:

bb -e '(System/getProperty "user.home")'
"/home/lispyclouds"

dharrigan 2026-02-02T19:59:29.954009Z

Arch: bb -e '(System/getProperty "user.home")' -> "/home/david"

borkdude 2026-02-02T19:59:58.656679Z

👍 thanks! seems to be some kind of edge case for this person

👍 1