Canop / broot

A new way to see and navigate directory trees : https://dystroy.org/broot
MIT License
10.83k stars 237 forks source link

user and group are not correctly recognized if defined via openldap #953

Closed dabesl closed 1 month ago

dabesl commented 1 month ago

Broot doesn't understand who I am because my user data is not provided in /etc/passwd but via openldap. Therefore broot displays user and group with ????. The following line shows the .config directory in my home: 733K 2024-10-21 18:27 rwxr_xr_x ???? ???? └── .config Since Debian-exim is defined in /etc/passwd and adm is defined in /etc/group, broot displays the following line from /var/log correctly: 4096 2024-10-21 00:09 rwxr_s___ Debian-exim adm ├── exim4 I can query the user facts with getent:

$ getent passwd myself
myself:*:1000:1000:myself:/home/myself:/bin/bash

These facts are fetched by sssd over openldap because in /etc/nsswitch.conf the following lines define this:

passwd:     sss files
group:      sss files

I don't know enough about system near programming but I think you just don't use the best library to get the data. I have eza installed and this displays everything correctly:

$ eza -agl --bytes --time-style "+%Y-%m-%d %H:%M"
drwxr-xr-x    - myself myself 2024-10-21 07:50 .config

I could provide you with the whole configuration of openldap, pam and the sss-daemon but I think it should not be necessary to follow this complicated way. There must be an easy way to query such basic data with some library.

Canop commented 1 month ago

Thanks for the detailed report.

Canop commented 1 month ago

@dabesl I just updated the uzers dependency to the last version, can you test it (current main) ?

dabesl commented 1 month ago

It works. You are incredible! Thank you!

Canop commented 1 month ago

You are incredible!

I just updated a dependency, that is I changed a "0.11" into "0.12" ;)

Canop commented 1 month ago

Fixed in 1.44.2