daedalus: error: cannot figure out user name on Ubuntu 20.04.2 LTS

Hello everyone. I did follow the instructions here:

  1. https://daedaluswallet.io/en/download/#modal=download_pgp_instructions_linux
  2. https://iohk.zendesk.com/hc/en-us/articles/900000776446

But I’m getting the same error using Ubutnu 20.04.2 LTS:

$ ./daedalus-3.3.0-mainnet-16556.bin 
SSE4 check pass
inside installer
source /nix/store/hck9pm5f5arp4sqyq13vpnp1k7bl40sl-tarball/tarball/tarball.tar.xz
mkdir: created directory '/home/<username>/.daedalus'
 344MiB 0:01:24 [4.10MiB/s] [===================================================================================================================================================>  ] 99%            
error: cannot figure out user name

Any clue on what can I do to solve the issue in this case? Thanks in advance!

_Originally posted by @jcortes in https://github.com/input-output-hk/daedalus/issues/2115#issuecomment-784331796_

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 2
  • Comments: 31 (10 by maintainers)

Most upvoted comments

Hi, I have the same issue on Ubuntu 20.10:

$ bash daedalus-3.3.1-mainnet-16693.bin 
SSE4 check pass
inside installer
source /nix/store/23pg4v95x22878h4vr25ibdk1k418b3c-tarball/tarball/tarball.tar.xz
 345MiB 0:00:30 [11.4MiB/s] [================================================================================================================================================================================================================================>   ] 99%            
error: cannot figure out user name

diso@bilbo ~/Downloads $ ./daedalus-3.3.2-mainnet-16919.bin SSE4 check pass inside installer source /nix/store/0nvm4f6m7yr62da3w2sd8b14khf3c95j-tarball/tarball/tarball.tar.xz 346MiB 0:00:23 [14.9MiB/s] [=========================================================================================================> ] 99%
error: cannot figure out user name

Same … i did follow the steps and daedalus is horrible with NIS, i have central NIS / NFS server, so i just can’t use daedalus… on my laptop local account, no problem. nfs / ldap pure sadness.

NIS / NFS Server are all Debian 10, my PC runs MINT. Laptop Mint.

EDIT: I did purge all the NIS stuff, installed slapd, connected… daedalus runs fine. 😉 NIS is tooooo old

Same on Fedora 33

./daedalus-3.3.1-mainnet-16693.bin
SSE4 check pass
inside installer
source /nix/store/23pg4v95x22878h4vr25ibdk1k418b3c-tarball/tarball/tarball.tar.xz
 345MiB 0:00:25 [13.5MiB/s] [==================================================>  ] 99%            
error: cannot figure out user name

Hi @rlees85 I closed because you did not answer my question. But now I can try to reproduce it. Thank you

https://github.com/NixOS/nix/blob/master/src/libutil/util.cc#L531-L538

the error comes from nix, not daedalus (but daedalus is using nix during the install) its using getpwuid() to lookup the current uid, and if that fails it will instead use $USER

Same here on Arch, Daedalus was working fine for me until I uninstalled it and tried to reinstall it in a systemd-homed partition. Tried every workaround from above but nothing seems to solve the issue.

Edit: After adding myuser❌myid:myid:myidname:/my/home/dir:/bin/bash to /etc/passwd temporally the issue gets resolved but nobody should do it it can break your system. The installer shouldn’t read /etc/passwd file directly but instead call getent passwd whitch will “translate” usernames from /etc/passwd and systemd-homed.

Can someone of you help us out here? @cleverca22 @disassembler @miorsufianiohk @ManusMcCole