Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User and Group always show ID instead of name #616

Closed
anhnt-2136 opened this issue Nov 6, 2023 · 29 comments
Closed

User and Group always show ID instead of name #616

anhnt-2136 opened this issue Nov 6, 2023 · 29 comments
Labels
duplicate This issue or pull request already exists errors › invalid output errors Something isn't working output question Further information is requested

Comments

@anhnt-2136
Copy link

anhnt-2136 commented Nov 6, 2023

OS: Ubuntu 20.04.6 LTS
Version: v0.15.1

Hi guys.

I'm using eza -algho but the result always shows User and Group ID, I can't find any command option to show the name instead. exa still shows the name
Screenshot from 2023-11-06 11-20-02

@anhnt-2136 anhnt-2136 added the question Further information is requested label Nov 6, 2023
@MartinFillon
Copy link
Contributor

Cannot reproduce under Ubuntu 23.04 with eza version: v0.15.1 [+git]

@MartinFillon
Copy link
Contributor

How did you install eza ? Cargo ? apt ?

@gierens
Copy link
Member

gierens commented Nov 6, 2023

I cannot reproduce this either on my Ubuntu 20.04.3 LTS test machine with eza v0.15.1 installed via apt.

@anhnt-2136
Copy link
Author

@MartinFillon I installed via apt. Lemme try install it again
@gierens that weird

@gierens
Copy link
Member

gierens commented Nov 6, 2023

I updated the deb repo to v0.15.2 just now, if you installed it via apt then maybe try that version.

@anhnt-2136
Copy link
Author

@gierens I updated the deb repo to v.015.2 but it still show the ID

@gierens
Copy link
Member

gierens commented Nov 6, 2023

can you send us the output of id?

@anhnt-2136
Copy link
Author

anhnt-2136 commented Nov 6, 2023

@gierens Same as my first comment image, the User and Group columns show the ID of my use/group instead of the name

@gierens
Copy link
Member

gierens commented Nov 6, 2023

No I mean the shell command id. I wanna see the output of that.

On my ubuntu 20 test machine it looks like this for example:
Screenshot from 2023-11-06 10-28-45

@anhnt-2136
Copy link
Author

anhnt-2136 commented Nov 6, 2023

Oh sorry, I'm misunderstood. Here is the result

uid=1208605825(xxx) gid=1208600513(domain users@xxx) groups=1208600513(domain users@xxx),4(adm),27(sudo),998(docker),1208600571(allowed rodc password replication group@xxx),1208606753(vpn_office@xxx)

@anhnt-2136
Copy link
Author

anhnt-2136 commented Nov 6, 2023

@gierens I tried in the virtual machine too and It shows the user name that I expected

@gierens
Copy link
Member

gierens commented Nov 6, 2023

uid=1208605825(xxx) gid=1208600513(domain users@xxx) groups=1208600513(domain users@xxx),4(adm),27(sudo),998(docker),1208600571(allowed rodc password replication group@xxx),1208606753(vpn_office@xxx)

Is this a company machine? Or are you using PAM for user management or anything?

@anhnt-2136
Copy link
Author

Yes, this is a company machine. I tried at my colleague computer and it's working too

@gierens
Copy link
Member

gierens commented Nov 6, 2023

Ok, interesting. But his id shows similar things? Like gid=1208600513(domain users@xxx)?

Hm, my guess would be that we have some problem with PAM here ... to investigate this we will first have to reproduce it ... so setup a test machine with PAM and stuff, that could take a while though.

We'll look into it! Thanks for reporting this!

@anhnt-2136
Copy link
Author

anhnt-2136 commented Nov 6, 2023

@gierens I just found out that it shows the ID with files/folders that are owned by my user/group, other user/groups like root, docker... still show the name
Screenshot from 2023-11-06 16-45-31
Screenshot from 2023-11-06 16-45-46

@gierens
Copy link
Member

gierens commented Nov 6, 2023

Yep, that's what I would expect because root, docker and stuff are managed locally and not by PAM.

@anhnt-2136
Copy link
Author

Yes, the name path inside round brackets is the same, only the ID is different

@gierens
Copy link
Member

gierens commented Nov 6, 2023

Hm, ok that's interesting ... then this could also be that something with you PAM setup in particular is wrong.

Anyway, we are going to try to reproduce this!

@anhnt-2136
Copy link
Author

@gierens Thanks. Let me know if I can help in any way.

@cfxegbert
Copy link
Contributor

What is your configuration for passwd and groups in /etc/nsswitch.conf?

@anhnt-2136
Copy link
Author

@cfxegbert here

passwd:         files systemd sss
group:          files systemd sss

@cfxegbert
Copy link
Contributor

As a test can you try switching the order on passwd, group, and shadow, to

passwd:         files sss systemd
group:          files sss systemd
shadow:         files sss systemd

@j-xella
Copy link

j-xella commented Nov 30, 2023

I have the same problem. User/group are only shown in digital form.

I am on RHEL 7.9, and use x64 musl version of eza 0.16.1

Could this issue be the same as #541 ?

@simaoafonso-pwt
Copy link

I have the same issue on CentOS 7, using x64 musl version of eza 0.16.1.

PAM is working correctly:

$ eza -lg
drwxr-xr-x    - 10914 LGROUP    1 Dec 11:45 FOLDER
$ getent passwd $USER
$USER:*:10914:10013::/home/$USER:/bin/tcsh

@simaoafonso-pwt
Copy link

I can't use the GNU version on CentOS 7, it was built on a too new glibc:

$ eza -lg
eza: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by eza)
$ /lib64/libc.so.6
GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.5 20150623 (Red Hat 4.8.5-44).
Compiled on a Linux 3.10.0 system on 2022-05-18.
Available extensions:
	The C stubs add-on version 2.1.2.
	crypt add-on version 2.1 by Michael Glad and others
	GNU Libidn by Simon Josefsson
	Native POSIX Threads Library by Ulrich Drepper et al
	BIND-8.2.3-T5B
	RT using linux kernel aio
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.

@BobobUnicorn
Copy link

I encountered this issue; in my case, it seems to be due to the way nsswitch.conf is configured (requires nss_cache) and the nix-store installed version bringing in its own libc.so; the quick fix here was to prepend LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_cache.so.2. I'm not entirely sure what the most reasonable solution for that is.

@apoorvkh
Copy link

I also had this problem and switching from eza_x86_64-unknown-linux-musl to eza_x86_64-unknown-linux-gnu fixed it for me.

@simaoafonso-pwt
Copy link

I also had this problem and switching from eza_x86_64-unknown-linux-musl to eza_x86_64-unknown-linux-gnu fixed it for me.

Can confirm this works.

Build my own version of the latest eza release on CentOS 7, to overcome the glibc limitation, and PAM users are detected correctly. I guess mixing musl and glibc breaks PAM...

I have the binary I built for CentOS 7, but Github does not let me upload it here.

@gierens
Copy link
Member

gierens commented Mar 21, 2024

This appears to be a duplicate of #541 therefore I'm going to close this one. We'll continue the discussion there.

@gierens gierens closed this as completed Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists errors › invalid output errors Something isn't working output question Further information is requested
Projects
None yet
Development

No branches or pull requests

8 participants