Closed archont00 closed 1 year ago
Same problem and error message with ldap users on version 7.30. OS is Mint 21 (Ubuntu 22.04 based)
appimaged is only tested with local users. I do not have ldap to test with.
I understand, but what would you like/need/plan in this respect. I wished I could simply offer a PR, but my skills are not sufficient for this. Though I can test, or suggest a debian based distribution with ldap preinstalled such as yunohost
Taking a quick look at it, it should be a fairly easy fix since the function that's throwing the error also doesn't really do anything ATM. It'll be fairly easy to gracefully fail instead of panicking, though I'd like to find out exactly why it's giving an error in the first place and probably make the function... function.
I also don't actually know what ldap is so I'll have to look that up and setup a VM so I can test it properly.
LDAP is a directory database for users and groups (and many other stuff in enterprise settings). I my case and many small linux networks, it's used to have a centralized database of users, groups, and is also used for user authentication through PAM and sssd. Actually is allows to have users and groups beyond /etc/passwd and /etc/groups usually using higher userid numbers (> 10000 or 100000). As a standard system, it also allows to use the same user/password for many different apps, including many web apps.
it's likely that the issue depends on the layer (i'm not knowledgeable about the details) addressed to check for users. It depends whether it checks users against the /etc/passwd content (where ldap user are not included) or a higher level abstraction where ldap (external) users will be included.
yunohost is easy to set up as a VM, it's a debian based distrib for self hosting internet/mail/web services, and it sets up ldap a central user database for all apps. Although as it doesn't have a graphical environement, it may be an issue to check appimaged.
We're just using user.Current()
and I'm guessing it's just looking at /etc/passwd then. That function isn't really essential anyways so we'll probably just elegantly fail instead of panicking.
Thanks for the info.
hi @CalebQ42 , thanks for your reaction. Indeed the explanation here https://pkg.go.dev/os/user confirms it is directly checking /ect/passwd. I suspect the library based on glibc will rather check also for domain/AD/LDAP users.
user.Current
uses the NSS libraries on Linux when.CGO is enabled. When it isn't, it simply falls back to parsing /etc/passwd.
Sorry, I'm not sure whether you did change anything yet toward this, just to let you know it's still the same as of today on v754.
Can you verify that @CalebQ42's https://github.com/probonopd/go-appimage/pull/235 fixes this? I have no openLDSP setup to test with. Thanks.
You don't need LDAP to reproduce this bug. There's a disparity in Go's os/user package when Cgo is enabled vs when it isn't. When the binary uses Cgo, user and group queries go through NSS. If Cgo is disabled, it falls back to parsing /etc/passwd and friends. So I ran into this issue because my user account is created by systemd-homed and doesn't reside in /etc/passwd.
So any user defined via NSS and not via shadow files will trigger this bug. This includes LDAP, systemd dynamic users, systemd drop-in users, systemd homed users, etc.
Relevant docs: https://pkg.go.dev/os/user
I tried testing out #235, but it doesn't play nicely with Gnome on Wayland apparently.
What's the problem you're having? I've been mostly testing it on Gnome with Wayland.
I chmod+x the appimaged binary for my platform and then got this:
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
execv error: No such file or directory.
I tried running it with QT_QPA_PLATFORM=wayland but that gave me a different error
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
I don't think I have qt installed.
You're getting this error when trying to run appimaged
? It shouldn't have any qt components at all and nothing in #235 should change that.
@CalebQ42 #235 works. I get an error about an unknown user, but appimaged continues to run. I had appimagelauncherd installed and that was messing with appimaged.
I've closed my other issue about systemd-homed. This issue could be re-titled to "appimaged panics enumerating NSS users".
Just to confirm this is now working as of release 765.
It reports
2023/03/06 ERROR term other instances: user: unknown userid 1000013
But seems to work fine otherwise Thanks a lot
Hi,
Kubuntu 22.04.
Starting as openLDAP user, uid 10000, /home/users/ldap_user, the appimaged fails:
When I run appimaged as local user (uid: 1000, /home/localuser), it seems to start fine.