[fix]macOS 10.13.x Could not determine audit condition
macOS 10.12.x ~ 10.13.x 终端无法打开
Could not datermine audit condition
[Process completed]
遇到了这个问题,Google搜索了一下网路上大致的解决方案都是修改权限
这个问题比较蛋疼,因为改了/usr/bin的权限导致sudo命令不能用了,终端也打不开了,所以就无法sudo -s了,也无法su root了。
开启Root用户方法参考:https://jingyan.baidu.com/art...
然后注销当前用户,用root登录。打开终端,输入以下命令。
chown -R root:wheel /usr/bin chmod 4755 /usr/bin/sudo reboot //重启电脑
至此就可以恢复用户权限了。终端可以打开了,不过我用的是iTems2。 So...下班回家了~~
参考:https://segmentfault.com/q/1010000011576439/
还有一种是修改/usr/bin/login 移除验证 可以临时打开终端 但影响其他应用打开
参考:https://stackoverflow.com/questions/42437368/login-login-could-not-determine-audit-condition
after I messed with my usr/bin permissions.
After a lot of trial and error I fixed it by deleting the FILE (not folder) called 'login', which is in /usr/bin.
I make a point to stress that it's not a folder but a file, because prior to Sierra there was a folder called usr/bin/login, whose deletion fixed some permission issues causing Terminal failures.
On MacOS Sierra the folder has been removed, but deleting the 'login' file (or moved it someplace else) solved my problem, and my machine works fine.
How fix this ?
Repair suggestion : 按照SF上述方法修改权限后,10.13系统仍然依旧,iterm2无法使用,起初我以为是On my zsh导致。 按stackoverflow方法修改login文件后 终端正常打开(仅临时)
修复终端后可以启动后 或者在 ROOT模式的Terminal内
sudo -s //登录你的ROOT用户密码
chown -R root:wheel /usr/bin
chmod 4755 /usr/bin/sudo
chmod 4755 /usr/bin/login
reboot
完成大吉!!
坑与 11. 11. 2017
促美优品
这样的博客让人禁不住一天来几次!
中医秘方
一言不发岂能证明我来过了?!
健康网
山高路远,好人平安!
小吃技术
一天不来访,浑身上下痒!
三五创业网
潜心学习,认真拜读!