Is there any way to make Console prompt for authentication to logs the user isn't authorised to?

apple.stackexchange https://apple.stackexchange.com/questions/380457

문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 apple.stackexchange
scroll top