MySQL Report Help Needed (Need Machine name and Admin)

joemamasmac
New Contributor III

Good Morning,

I am attempting to export a list of computers with some of the "extensions attributes" attached to it for our OD to AD project. The problem is, our desktop support team has not kept good record of which machines were associated with which users and departments. I contacted Jamf for help and they gave me the following command to run. Since we make all office/Faculty/Staff admin users on their desktop machines, my goal was to pull out the admin extension attribute, along with the machine name to get a list of the primary user.

"C:Program FilesMySQLMySQL Server 5.6inmysql.exe" -u jamfsoftware -password jamfsoftware -e "select computer_id,username,admin from user_receipts where admin=1;" > C:UsersAdministratorDesktopfilename.csv

This works, but we have about 1000 machines here on campus. When this runs, it is giving me almost 2million lines lines when I attempt to pull it into excel. Excel craps out and says to import this in segments, never done that before. I then tried the omit username command, but I don't know if my syntax is even close, as it fails when I run it. We have 1 admin default account on every machine, I was thinking this would help to limit the number of entries but it keeps failing.

select user_receipts.computer_id, user_receipts.username, user_receipts.admin, computers.computer_name from computers, user_receipts where username!=ADMINISTRATOR and admin=1;

Has anyone else done anything similar, and do you have any suggestions for me getting this information out of Casper?

Joe

1 REPLY 1

cdenesha
Valued Contributor II

I can suggest that you open the exported file in a text editor that supports unlimited file size so you can see if you are getting what you want. You could even break the file up into pieces this way.