Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
musl and nsswitch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 888

PostPosted: Sun May 12, 2024 10:45 am    Post subject: musl and nsswitch Reply with quote

Hi,

I understand that musl does not support/read /etc/nsswitch.conf as glibc does.

Problem is I'm using "files winbind" or "compat winbind" in nsswitch to allow for PAM-authenticated sshd access via winbind auth.
So migrating from glibc to musl isn't straightforward, and there's no mentioning nsswitch in https://wiki.gentoo.org/wiki/Musl_usage_guide.

First thing I tried was to install nscd and start the service.

It started exiting with a plain "syntax error" message, but not sure why. I eventually trimmed the file down to using just compat, files, dns and winbind.
Both "compat" and "files" yield an error message saying that libnss_compat.so and libnss_files.so are not available.
If I just keep "winbind" and "dns" I get no errors, and the nscd service starts.

At that point I can access sshd via PAM and an AD user via winbind albeit with a very slow login right after entering the password (setting UseDNS to no in sshd does not change the behavior).

In any case, nscd is not marked stable in portage.

There's another package sssd available, but I don't know how it works, if it reads the content of nsswitch.conf or not, etc.

In a nutshell, what is the currently best way of letting, say, MS Active Directory users log into a Gentoo musl system with sshd?
I currently tell sshd to "UsePAM", and I set up pam to use the pam_winbind.so auth module.
I then have this in nsswitch.conf:
Code:
group:  winbind
hosts:  dns
networks: dns
passwd: winbind
shadow: winbind

I start nscd, and I can *slowly* log into the Gentoo musl system with the credentials of an AD user.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum