/build/static/layout/Breadcrumb_cap_w.png

Systems Management Question


K1000 - Update manager field

12/05/2019 209 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` ) ")


Thanks!


Updated.

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

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

2

Hi,

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

wWRQN6tDBFC8AAAAABJRU5ErkJggg==

Answered 12/05/2019 by: Timokirch
2nd Degree Black Belt

  • That seems to work, thanks!