Systems Management Question

K1000 - Update manager field

12/05/2019 345 views

Does anyone have a SQL query update that fixes the manager field for users?

Since KACE imports the manager field as the DN, it doesn't work properly.  I currently have it setup to set Custom 4 as the manager, so I can run a SQL command to only grab the needed information and then set it as the manager field. My SQL skills are a bit rusty, so asking if anyone has a rule that already does this.

Tried the fix from here: https://www.itninja.com/blog/view/adding-manager-information-to-your-kace-user-table

But doesn't seem to work, get the following error:  12/05/2019 10:36:36> Starting: 12/05/2019 10:36:36 12/05/2019 10:36:36> Executing Select Query... 12/05/2019 10:36:36> mysqli error: [1054: Unknown column 'CUSTOM_4' in 'field list'] in EXECUTE("update `USER` Set `CUSTOM_4` = IF( LOCATE('CN=', `CUSTOM_4`) > 0, SUBSTRING(`CUSTOM_4`, 4, LOCATE(',', `CUSTOM_4`) - 4), `CUSTOM_4` ) ")



Answer Summary:
import the LDAP UID as "distinguishedname" from ldap
2 Comments   [ + ] Show comments


  • What version of the SMA are you currently running? I ask as there is already a Manager field in the Settings -> Users. The Manager can be set manually or during a LDAP user import.
  • Running 10.0.290, I know there is a manager field, but KACE doesn't import it correctly from LDAP. It uses the DN, so it comes out as
    CN=" ", OU= " ", DC= " ", DC= " ". So, I have seen people in the past setting it as the Custom Field and then using a SQL statement to grab just the Manager's name from that string and then set it to the manager's field of the user.

Answer Chosen by the Author



if i remember right there was a "workaround". Have you tried to import the LDAP UID as "distinguishedname" from ldap?


Answered 12/05/2019 by: Timokirch
3rd Degree Black Belt

  • That seems to work, thanks!
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ