Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

emdesigns

macrumors newbie
Original poster
Aug 20, 2015
1
0
Portugal,porto
Hello to all

I have a Mac pro

I recently forgot the password for my admin account i am trying to do this

mount - uw /

and then

dscl . -append /Group/admin GroupMembership Username

But the computer tells me that that directory doesnt exist

Can any one let me know how to find the path to change my normal account to admin

Regards
to all
 
dscl . -append /Group/admin GroupMembership Username
your syntax is wrong... it's /Groups
however:
dseditgroup is the better way to add a user to a group:
https://managingosx.wordpress.com/2010/01/14/add-a-user-to-the-admin-group-via-command-line-3-0/

The problem with dscl append is that it will repeatedly add a user to a group, so the user can end up as a group member multiple times. dseditgroup checks the existing membership and adds the user only if the user isn't already a member.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.