Skip to content

Does anyone have working pam.d modules for winbind with active directory integration ?

The wiki involving joining a Arch host into an AD seems to be a bit outdated in the `pam` section. I can't seem to sign into my AD users and none of the services are really throwing errors.

​

Does anyone have a working module configuration that I can check out before I roll back to sssd + ipa client ?

1 points0 comments
Open on Reddit
About this post
Posted
Archived
Score
1 · 100% up
Kind
Text
ID
ect0px

Author

9
posts
79
comments
0
media
View profile

1 comment

In case anyone else gets this in search I wanted to add some more information. Unfortunately I haven't gotten it to work yet on Arch.
The PAM doc for winbind is ripped right from the Samba doc which is a for-instance example and does not match how Arch lays out pam.d

Ubuntu has a configuration package, libpam-winbind, and when it is installed it modifies files under pam.d/ to integrate winbind into auth et. al.
Below a patch of the changes it makes.
Ubuntu creates these five common files which are included repeatedly in other pam.d/ config files.
I guess I'm using a Steamdeck so the Valve team may have made some wonky change, but the 'deck doesn't have common pam files so I presume Arch-proper doesn't either.
So you have to go thru each one and add pam_winbind.so to each of requisite the stacks (or completely redo pam.d on Arch).

From 89ee653e04d8769e2bde545c7c5bbe16ce6ecdd2 Mon Sep 17 00:00:00 2001
From: root <root@ubuntu2204>
Date: Mon, 10 Jul 2023 02:54:52 +0000
Subject: [PATCH 1/1] libpam-winbind

---
 pam.d/common-account                | 3 ++-
 pam.d/common-auth                   | 3 ++-
 pam.d/common-password               | 3 ++-
 pam.d/common-session                | 1 +
 pam.d/common-session-noninteractive | 1 +
 5 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/pam.d/common-account b/pam.d/common-account
index 316b173..26d1652 100644
--- a/pam.d/common-account
+++ b/pam.d/common-account
@@ -14,7 +14,8 @@
 #
 
 # here are the per-package modules (the "Primary" block)
-account	[success=1 new_authtok_reqd=done default=ignore]	pam_unix.so 
+account	[success=2 new_authtok_reqd=done default=ignore]	pam_unix.so 
+account	[success=1 new_authtok_reqd=done default=ignore]	pam_winbind.so 
 # here's the fallback if no module succeeds
 account	requisite			pam_deny.so
 # prime the stack with a positive return value if there isn't one already;
diff --git a/pam.d/common-auth b/pam.d/common-auth
index f3fd972..eb267d0 100644
--- a/pam.d/common-auth
+++ b/pam.d/common-auth
@@ -14,7 +14,8 @@
 # pam-auth-update(8) for details.
 
 # here are the per-package modules (the "Primary" block)
-auth	[success=1 default=ignore]	pam_unix.so nullok
+auth	[success=2 default=ignore]	pam_unix.so nullok
+auth	[success=1 default=ignore]	pam_winbind.so krb5_auth krb5_ccache_type=FILE cached_login try_first_pass
 # here's the fallback if no module succeeds
 auth	requisite			pam_deny.so
 # prime the stack with a positive return value if there isn't one already;
diff --git a/pam.d/common-password b/pam.d/common-password
index 6fa9346..0d2bde1 100644
--- a/pam.d/common-password
+++ b/pam.d/common-password
@@ -22,7 +22,8 @@
 # pam-auth-update(8) for details.
 
 # here are the per-package modules (the "Primary" block)
-password	[success=1 default=ignore]	pam_unix.so obscure yescrypt
+password	[success=2 default=ignore]	pam_unix.so obscure yescrypt
+password	[success=1 default=ignore]	pam_winbind.so try_authtok try_first_pass
 # here's the fallback if no module succeeds
 password	requisite			pam_deny.so
 # prime the stack with a positive return value if there isn't one already;
diff --git a/pam.d/common-session b/pam.d/common-session
index b33d849..8cb1d22 100644
--- a/pam.d/common-session
+++ b/pam.d/common-session
@@ -26,5 +26,6 @@ session	required			pam_permit.so
 session optional			pam_umask.so
 # and here are more per-package modules (the "Additional" block)
 session	required	pam_unix.so 
+session	optional			pam_winbind.so 
 session	optional	pam_systemd.so 
 # end of pam-auth-update config
diff --git a/pam.d/common-session-noninteractive b/pam.d/common-session-noninteractive
index 1fee2c4..ac7f74a 100644
--- a/pam.d/common-session-noninteractive
+++ b/pam.d/common-session-noninteractive
@@ -27,4 +27,5 @@ session	required			pam_permit.so
 session optional			pam_umask.so
 # and here are more per-package modules (the "Additional" block)
 session	required	pam_unix.so 
+session	optional			pam_winbind.so 
 # end of pam-auth-update config
-- 
2.38.1
2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.