3

If I try to access system.log from my non-admin account I get the message "Unable to read the file"

Is there any way to make Console.app prompt for administrator credentials to view logs the user isn't authorised to as happens elsewhere in the GUI?

Console

Presumably the message is because I'm not authorised:

A1398% ls -la /private/var/log/system.log
-rw-r-----  1 root  admin  1807993 Jan 23 16:14 /private/var/log/system.log

I know sudo /Applications/Utilities/Console.app/Contents/MacOS/Console will open Console.app with sufficient rights but it is rather inconvenient.

5
  • It had been some time for me, but what about sudo open -a Console (could be that it was -A)? Does that still work? If so, it would at least shorten the command line.
    – Phoenix
    Jan 23, 2020 at 18:11
  • @Phoenix - sudo open -a Console opens Console but despite the sudo only as current user so the system.log is unavailable.
    – lx07
    Jan 23, 2020 at 18:36
  • Ah, ok. As stated: It was some time ago (~3--4 years) since I last did something with open and currently not even run macOS any more. Thanks for testing it though. :-)
    – Phoenix
    Jan 23, 2020 at 18:42
  • @Phoenix - would have been good - I was optimistic :-)
    – lx07
    Jan 23, 2020 at 18:47
  • 1
    The command path in Catalina is now /System/Applications/Utilities/Console.app/Contents/MacOS/Console.
    – Jim L.
    Jan 25, 2020 at 16:57

1 Answer 1

2

Console.app is not designed to prompt for credentials.

If you don't want to type the command every time or you don't want to remember it you have two similar choices:

Create a simple bash script or a nice automation with Automator and then you can place it everywhere you want.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .