Accidentally set write permission on sudoers

command linesudosudoedit

I'm currently running Mac OS Sierra. I don't know exactly how, but somehow I've altered some permissions and think it'd be a good idea to reset them, but I do not know how. Each time I execute sudo, I am met with this warning: sudo: /var/db/sudo/ts is group writable

The command executes fine, but it seems to be a good idea to fix that. Please advise.

results:

0 dr-x—— 4 root wheel 136 Mar 28 11:34 .
0 dr-x-w—- 5 root wheel 170 Mar 28 10:38 ..
8 -rw–w—- 1 root wheel 80 Jan 27 00:51 zacadmin
8 -rw——- 1 root wheel 80 Mar 28 12:00 zbrown

Best Answer

The following command will remove write permission from group on file /var/db/sudo/ts

sudo chmod g-w /var/db/sudo/ts
Related Question