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

gcp: fixed OS Login enabling #1445

Merged
merged 3 commits into from Dec 1, 2023
Merged

gcp: fixed OS Login enabling #1445

merged 3 commits into from Dec 1, 2023

Conversation

tormath1
Copy link
Contributor

@tormath1 tormath1 commented Nov 30, 2023

Noticed in logs:

Nov 20 19:28:42.573152 enable-oslogin[1122]: /etc/ssh/sshd_config does not include configuration snippets in /etc/ssh/sshd_config.d. Not enabling OS Login

The check:

if ! grep --fixed-strings --no-messages --silent 'Include "/etc/ssh/sshd_config.d/*.conf"' '/etc/ssh/sshd_config'; then
echo '/etc/ssh/sshd_config does not include configuration snippets in /etc/ssh/sshd_config.d. Not enabling OS Login'
exit 0
is not passing because of the duplicate /:

$ sudo cat /etc/ssh/sshd_config | grep Include
# Make sure that all Match options are below this Include!
Include "//etc/ssh/sshd_config.d/*.conf"

Testing done

@tormath1
Copy link
Contributor Author

Looks better but now getting:

Nov 30 13:28:41.819250 enable-oslogin[1232]: /etc/pam.d/sshd already exists. Not enabling OS Login

Copy link

github-actions bot commented Nov 30, 2023

Build action triggered: https://github.com/flatcar/scripts/actions/runs/7061211572

@pothos
Copy link
Member

pothos commented Nov 30, 2023

A backport to Beta would be good

@tormath1
Copy link
Contributor Author

tormath1 commented Dec 1, 2023

Looks better but now getting:

Nov 30 13:28:41.819250 enable-oslogin[1232]: /etc/pam.d/sshd already exists. Not enabling OS Login

This line was not displayed on the first run of the unit, so it works correctly now - added a RemainAfterExit that sould prevent the unit to be restarted a few time (this is done in #1441 too)

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
Otherwise it gets restarted a few times, which displays this line in the
logs:
```
Nov 30 13:28:41.819250 enable-oslogin[1232]: /etc/pam.d/sshd already exists. Not enabling OS Login
```

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
@tormath1 tormath1 marked this pull request as ready for review December 1, 2023 14:06
@tormath1 tormath1 merged commit 586fc12 into main Dec 1, 2023
1 check failed
@tormath1 tormath1 deleted the tormath1/gcp-oslogin branch December 1, 2023 14:07
@tormath1
Copy link
Contributor Author

tormath1 commented Dec 1, 2023

backported to:

  • flatcar-3794
  • flatcar-3760

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2 participants