Q&A: How can I execute the fix computer button in system diagnostic by command line?

Question

For UCS@School the System diagnostic module may complain with a Critical Error about missing School Computer Consistency, hitting the “Fix computer objects” button will work, but I need a CLI version - what’s the correct syntax?

Answer

Within UCS@School the computer objects in LDAP have stored some extra attributes and information, such as a role. If you update an environment from a very old UCS version, this information may be missing.

With the following command the “UCS@school School Computer Consistency” will be restored. This is also useful for automation or if you have to manage more than one environment at once:

eval "$(ucr shell hostname domainname)"
curl -H 'Content-Type: application/json' -d '{"options":{"plugin":"903_ucsschool_schoolcomputers","args":{"action":"fix_computers"}}}' "https://Administrator:PASSWORD@${hostname}.${domainname}/univention/command/diagnostic/run" -k

Please note: Please keep in mind that the (internal) name of the check plugin may change in the future.

1 Like
Mastodon