Skip to main content

Hi.
We are having some users that don't have admin rights but need to see what happening on the system.log file in Terminal.
They use tail -f /var/log/system.log



Is there a way to open Terminal Window and run this command in this window?



Thanks

create a script :
#!/bin/bash
tail -f /var/log/system.log



then save it with ".command" extension at the end of the file. This will allow users to double click to run it from Terminal.


Yep. You could even run that right from Self Service if you wanted to.


you can package the script as above (lets call it "log.command"). Then run it with the command line
open log.command



This will open the Terminal with the result.



I haven test this but it should work


Great guys.
Thanks.



Will try this and let you know.



Cheers,
Maik


You can combine all these in to one package. Command can be run as postflight script. Then make it available from Self Service.


This has inspired me to add a few more lines to my post image script. Our config techs claim my jamfhelper notifications of the various stages are not detailed enough to know what's happening. I'll just bring up system.log , installer.log, and jamf.log for them. (Mostly I think they are concerned with not knowing what's happening when it's applying all available Apple software updates.)



Next they will want me to figure out how to set the terminal windows sizes so it displays the logs nicely.


It seems not to work as expected in our environment.
As our users are not local admin they can not view the system.log file.
So we place the log.command on the HDD and allow the execution of it via a Policy.



It's opening the terminal but it seems it will be open as users as it directly stops with the Command "Permission denied"...



Even with a PKG with Postflight it's the same.



Any idea? :-(


try to change the system log file permission - this will give read only rights to any user. Then run the command.
#!/bin/bash
chmod 644 /var/log/system.log && tail -f /var/log/system.log



you can always put the permission back with the following command
chmod 640 /var/log/system.log


Reply