taking away admin rights using cli command doesn't work
See original GitHub issueI ran
sudo dscl . -delete /Groups/admin GroupMembership myaccount
rebooted
but when I open the shell I can still run sudo su -
and when I look at the myaccount user it is still listed as Admin in the Users & groups config
and id myaccount
shows up with
uid=501(myaccount) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),701(com.apple.sharepoint.group.1),33(_appstore),100(_lpoperator),204(_developer),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh)
Issue Analytics
- State:
- Created 7 years ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
How to remove administrator rights Command ... - YouTube
Removing administrator privileges means to remove admin user from local administrators group. You can use command prompt to remove admin ...
Read more >How to add adminstrator rights using command prompt ...
Adding admin privileges or admin rights to user account is actually adding a user to a local administrators group. You can do it...
Read more >Fix Can't Run CMD as Administrator in 7 Easy Steps
First, Right-click your desktop, select New and then click on Shortcut. Command Prompt admin won't open Windows 10 · In the text field,...
Read more >How to Remove Admin Rights without Reducing Productivity
A guide to the risks associated with admin rights and over-privileged users, and how to remove admin rights in order to reduce those...
Read more >Force a program to run *without* administrator privileges or ...
Note that if the admin privileges are due to a trustinfo entry in a manifest, obviously this will not work. – user1258361. Dec...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Turns out I’m still in the group because my UUID is still in the group
This command really removed me from the admin group:
Sudo no longer works, and I’m shown as a Standard user in the Users & Groups settings panel.
So you might have to add this command to your guide.
(found this out thanks to https://superuser.com/questions/279891/list-all-members-of-a-group-mac-os-x/395738#395738 )
and because of SIP I can’t dtruss dsmemberutil, dscl and dscacheutil 😦