使用终端从 Mac 中删除受密码保护的配置文件

Remove password protected profile from Mac with the terminal

我的 mac 上有一个受密码保护的个人资料,我想用终端删除它。当运行命令:

profiles -R -p MyProfile

终端要求我提供配置文件密码:

Enter the profile removal password:

现在我必须在终端中手动输入密码(没有管理员密码)。是否可以创建一个包含密码的命令,以便自动删除配置文件?

来自 man 1 profiles,

-z  The profile removal password. If not specified and the profile requires
    a removal password, you will be prompted.

所以我猜你需要让你的命令看起来像

profiles -R -p MyProfile -z MyProfilePassword