guest-oslogin: PAM account function broken in 20230919.00
We use the PAM account function as documented in the README, but as of the google-compute-engine-oslogin-20231004 release, PAM account lookups using the pam_oslogin_login.so module fail with the error: PAM unable to resolve symbol: pam_sm_acct_mgmt.
I see the pam_sm_acct_mgmt function was removed in #116. This change broke functionality that we depend on. Can it be reversed?
For reference, our pam configuration uses code like this to apply different policies to oslogin vs local or ldap user accounts (e.g. restricting user account login based on group membership).
account [success=1 default=ignore] pam_oslogin_login.so
account substack user-policy
The project README documents how to use both the pam_oslogin_login.so and pam_oslogin_admin.so modules in the PAM account stack, so I would expect this functionality to still be supported. (https://github.com/GoogleCloudPlatform/guest-oslogin/tree/master#pam-modules)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 8
- Comments: 36 (18 by maintainers)
Commits related to this issue
- pam: bring back pam's account management implementation With this change users can get back to using these pam modules for their own custom pam configurations in a way to differentiate oslogin users ... — committed to dorileo/guest-oslogin by dorileo 3 years ago
- pam: bring back pam's account management implementation With this change users can get back to using these pam modules for their own custom pam configurations in a way to differentiate oslogin users ... — committed to dorileo/guest-oslogin by dorileo 3 years ago
- pam: bring back pam's account management implementation (#133) With this change users can get back to using these pam modules for their own custom pam configurations in a way to differentiate oslogin... — committed to GoogleCloudPlatform/guest-oslogin by dorileo 3 years ago
Google support did share with me the following to the
sudo suissue I had:Workaround:
Edit the
/etc/pam.d/sufile and remove the following block:I couldn’t say about the SSH issues you are seeing though sorry.
On all of our Ubuntu GCP environments today we’ve noticed
sudo susuddenly failing across them all.We log in with our accounts via oslogin. The error logs point to the removal of
pam_oslogin_admin.soas the problem:I would consider this a significant regression and will likely be impacting many users soon enough presuming the rollout of this change is affecting existing instances that upgrade now. Happy to raise a separate issue if needed here or elsewhere.
Edit - I raised a support ticket for this and it’s been confirmed as an issue on existing systems. Public issue here
@dorileo Looks like we are still experiencing a similar issue with this. Recently upgraded to Ubuntu 22.04 and enabled
oslogin, with thegoogle-guest-agentandgoogle-compute-engine-osloginbeing at the latest release. We continue to see:After removing the following lines from
/etc/pam.d/su, it works:Versions:
The PR fixing this issue was merged and it will be available on the next os login release.
Thanks, Leo
@dorileo is there any place where we can track the progress of Canonical fixing the dependency issue? We would like to know if we roll-out manual measures to mitigate this or we can wait a reasonable amount of time for Canonical to fix it. Thanks!
Hi @gerry-tock
That’s expected, we worked with Canonical to have the issue fixed,
unattended-upgrademight have picked the new versions and installed to your failing VM.Thanks, Leo
@dorileo What are the plans to address the original issues? We have customers that can no longer login is as AD user using SSH.
hi @marciobasel in your case you should update also guest-agent package, canonical is working to fix their dependencies in the packages and avoid this case you are describing, but until they do you will need to guarantee that when you update oslogin you also update guest-agent.
I can confirm I have the exact same issue.
And I can replicate it very easily. Here are the steps:
sudo apt-get install google-compute-engine-osloginThis seems quite concerning.
Similar issue here. Two of our GCP ubuntu instance suddenly became unable to login.
No SSH from web, no SSH from gcloud command line, even user creation from startup-script won’t work (basically locked-out from these VM).
Mounted these VM disks to other instance, found a bunch of PAM errors in
auth.logwhen trying to login:PAM unable to dlopen(pam_oslogin_admin.so): /lib/security/pam_oslogin_admin.so: cannot open shared object file: No such file or directoryHi @gygitlab,
The problem you are reporting is a different issue, it’s that guest-agent is not cleaning up the previous configuration. Thanks for raising it and creating a separate report to it.
Thanks, Leo