Authorize a non-admin developer in Xcode / Mac OS

后端 未结 10 1106
孤城傲影
孤城傲影 2020-12-04 05:09

I use a standard user account for my daily tasks on Mac OS. Since upgrading to Snow Leopard I am asked to do the following when a program is run from within Xcode:

\

10条回答
  •  难免孤独
    2020-12-04 05:51

    Ned Deily's solution works perfectly fine, provided your user is allowed to sudo.

    If he's not, you can su to an admin account, then use his dscl . append /Groups/_developer GroupMembership $user, where $user is the username.

    However, I mistakenly thought it did not because I wrongly typed in the user's name in the command and it silently fails.

    Therefore, after entering this command, you should proof-check it. This will check if $user is in $group, where the variables represent respectively the user name and the group name.

    dsmemberutil checkmembership -U $user -G $group
    

    This command will either print the message user is not a member of the group or user is a member of the group.

提交回复
热议问题