kc9wwh / logCollection

Script to upload client device logs to Jamf Pro
MIT License
111 stars 27 forks source link

Log File Not Producing #21

Open redsee83 opened 1 year ago

redsee83 commented 1 year ago

After trying multiple log files in different locations I cannot get the script to produce a file in jamf attachments MacOS Version 13.3 Macbook Pro M1

--Jamf Log--

Script result: adding: Library/Management/super/super.log (deflated 89%) adding: Library/Management/super/installer.log (deflated 82%) adding: Library/Management/super/mdmWorkflow.log (deflated 91%) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 684 100 684 0 0 720 0 --:--:-- --:--:-- --:--:-- 734 100 684 100 684 0 0 719 0 --:--:-- --:--:-- --:--:-- 733

syntax error at line 1, column 0, byte 0: <!doctype html>HTTP Status 404 – Not Found

HTTP Status 404 – Not Found


Type Status Report

Message Not Found

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


^ at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/XML/Parser.pm line 187. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 17032 100 684 100 16348 829 19823 --:--:-- --:--:-- --:--:-- 21001 100 17032 100 684 100 16348 828 19792 --:--:-- --:--:-- --:--:-- 20975 <!doctype html>HTTP Status 404 – Not Found

HTTP Status 404 – Not Found


Type Status Report

Message Not Found

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


zzetqwe commented 1 year ago

Both encrypted and regular scripts are not working for me. I tested on both Intel and Silicon machines. Here is the logs I get:

Script result: adding: private/var/log/install.log (deflated 91%) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 422 100 422 0 0 690 0 --:--:-- --:--:-- --:--:-- 696

mismatched tag at line 10, column 2, byte 404:

You can get technical details here.
Please continue your visit at our home page.

=^ at /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level/XML/Parser.pm line 187. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 93 70059 0 0 93 65536 0 112k --:--:-- --:--:-- --:--:-- 113k 100 70481 100 422 100 70059 615 99k --:--:-- --:--:-- --:--:-- 101k

Status page

Unauthorized

The request requires user authentication

You can get technical details here.
Please continue your visit at our home page.

ryanasik commented 1 year ago

I am getting the same error message of Unauthorized The request requires user authentication.

robzlittle commented 1 year ago

Was able to fix by changing line 66 to: jamfProPass=$( echo "$6" | /usr/bin/openssl enc -aes256 -md md5 -d -a -A -S "$8" -k "$9" )

redsee83 commented 1 year ago

Was able to fix by changing line 66 to: jamfProPass=$( echo "$6" | /usr/bin/openssl enc -aes256 -md md5 -d -a -A -S "$8" -k "$9" )

Line 66 being; ## Log Collection

So you mean you added this additional line of code after line 66? or did you replace an existing line of code with your line somewhere else in the script?

robzlittle commented 1 year ago

Replace the line. jamfProPass=$( echo "$6" | /usr/bin/openssl enc -aes256 -d -a -A -S "$8" -k "$9" )

with jamfProPass=$( echo "$6" | /usr/bin/openssl enc -aes256 -md md5 -d -a -A -S "$8" -k "$9" )

(viewing the script at https://github.com/kc9wwh/logCollection/blob/master/logCollection-encStrings.sh, that happens to be line 66).

andrewvalentine commented 2 weeks ago

I'm getting the same error. I've changed the line as recommended, with the same result. Has anyone got any further advice to get this working?