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

systemd: Fix error message when joining AD domains #13803

Merged
merged 1 commit into from Mar 27, 2020

Conversation

martinpitt
Copy link
Member

Installing cockpit-ws credentials is only supported for FreeIPA. When
joining an AD domain, trying to call the ipa command line client will
just thrown an error message "IPA client is not configured on this
system". This appears in the "Join Domain" dialog without further
details, but the joining works anyway, so this was rather confusing.

Only actually run install_ws_credentials() when the Server software is
"ipa".

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1813136

Installing cockpit-ws credentials is only supported for FreeIPA. When
joining an AD domain, trying to call the `ipa` command line client will
just thrown an error message "IPA client is not configured on this
system". This appears in the "Join Domain" dialog without further
details, but the joining works anyway, so this was rather confusing.

Only actually run install_ws_credentials() when the Server software is
"ipa".

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1813136
@martinpitt
Copy link
Member Author

Our regression tests will make sure that ws credentials still work against FreeIPA. However, we don't have an AD server in our CI, so this can only be tested manually. I did that against @sgallagher 's AD server (thanks!), and joining the domain now works cleanly. In the console I see

installing ws credentials not supported for server software active-directory

I'd like to keep that log message for easier debugging on the customer side, and it confirms that the server software query works correctly for both IPA and AD.

@sgallagher
Copy link
Contributor

LGTM

@martinpitt martinpitt added the release-blocker Targetted for next release label Mar 27, 2020
@martinpitt martinpitt merged commit 663c2e4 into cockpit-project:master Mar 27, 2020
@martinpitt martinpitt deleted the realm-ad-join branch March 27, 2020 16:05
martinpitt added a commit to martinpitt/cockpit that referenced this pull request Apr 21, 2020
Re-use the common TestRealms tests.

This currently uses a custom sudo rule for giving sudo access to domain
admins. This is not very elegant yet, but initial search all pointed to
this method. There ought to be a centralized method on the domain server
side, similar to `ipa-advise enable-admins-sudo`.

Adjust the expected error messages in testUnqualifiedUsers() when giving
a wrong password, as they look different when joining AD.

This also detects the AD joining bug fixed in PR cockpit-project#13803, so skip
testUnqualifiedUsers() on rhel-8-2-distropkg.

Closes cockpit-project#13921
martinpitt added a commit that referenced this pull request Apr 21, 2020
Re-use the common TestRealms tests.

This currently uses a custom sudo rule for giving sudo access to domain
admins. This is not very elegant yet, but initial search all pointed to
this method. There ought to be a centralized method on the domain server
side, similar to `ipa-advise enable-admins-sudo`.

Adjust the expected error messages in testUnqualifiedUsers() when giving
a wrong password, as they look different when joining AD.

This also detects the AD joining bug fixed in PR #13803, so skip
testUnqualifiedUsers() on rhel-8-2-distropkg.

Closes #13921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker Targetted for next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants