I have been using SW for a while now and haven't had much issue to speak of with AD scans. The scans generally are finding when add/remove changes occur in AD. Recently, I expanded the AD scanning to include more users that it imports by changing the base DN setting. After changing this in my testing environment, the additional users ARE being pulled into the system, however only the email address is being pulled into the SW database; first and last names are being left out.

To take this further, if I check the SW setting to sync SW users with AD, it prompts with an are you sure you want to apply these changes and the changes it says it will make is that it will make, for example, user Bob have a blank name instead of Bob. Or course, I backed out of this window and canceled syncing changes with AD.

Worked with SW support to get this resolved. There wasn't anything in particular that was noticeably "wrong" with my installation. There was, however, some sort of a sync issue between the ad_users table and the users table within the SW database. In the end, emptying the ad_users table and re-running an AD scan corrected the problems encountered.

Connected to the db using MSAccess and an ODBC connection to created a custom query to report differences between the ad_users and the users tables (joined the two tables: ad_users.user_id to users.id). See http://community.spiceworks.com/how_to/show/205 for info on how to setup the ODBC connection.

Stopped the SW service

Using the SQLite Manager plugin for Firefox, I emptied the ad_users table

Started the SW service and ran an AD scan

Verified the fix by re-running the query in step #1

Note: Be sure to NEVER update the SW database while SW is running. Doing so will corrupt the database and you will have to revert back to backup of the system.

6 Replies

I haven't seen this exact error but I did just recently change some fields in Active Directory and noticed that after 5 days of scaning AD ever 30 mins none of the changes were made in Spiceworks. We dont have the SW snyc to AD on either it makes my Network guy a little nervous. But I have seen some of the AD users that have names in them not show the names in AD as well and thats how they get imported into Spiceworks.

Yes Patrick, it appears that I am also seeing that same issue. Also, I checked the database again and it appears that for the users I'm referencing it's more than just first and last names not populating. Except for the the email address, none of the AD attributes are updating.

I looked at this issue more yesterday. It appears that Spiceworks functions in this way:

When an AD scan takes place, it scans and imports all user accounts (both machine and user accounts) from AD and syncs them with two tables in the database; ad_users and ad_computers for each respective account type.

Also, there is a users table within the SW database (this is the main user table that houses the "People" inventory within the software) and it appears that the AD scan is supposed to see changes from the ad_users table after the AD scan takes place and is supposed to replicate them over to the SW user table.

So in reality, I guess the issue is not that the AD scan isn't seeing changes in AD, rather it is that changes in the ad_users table isn't replicating over to the users table. Of course this is assuming that I know how SW was designed to function...

Worked with SW support to get this resolved. There wasn't anything in particular that was noticeably "wrong" with my installation. There was, however, some sort of a sync issue between the ad_users table and the users table within the SW database. In the end, emptying the ad_users table and re-running an AD scan corrected the problems encountered.

Connected to the db using MSAccess and an ODBC connection to created a custom query to report differences between the ad_users and the users tables (joined the two tables: ad_users.user_id to users.id). See http://community.spiceworks.com/how_to/show/205 for info on how to setup the ODBC connection.

Stopped the SW service

Using the SQLite Manager plugin for Firefox, I emptied the ad_users table

Started the SW service and ran an AD scan

Verified the fix by re-running the query in step #1

Note: Be sure to NEVER update the SW database while SW is running. Doing so will corrupt the database and you will have to revert back to backup of the system.