I got a new computer and while setting it up I mucked up something by changing the name of the user I had created. My main hard drive (Macintosh HD) was asking me for passwords to edit info, some apps weren’t letting me create/save data into folders, etc.
So I did some research to find out how to fix it. The internet kinda let me down on this one. I mean, I found my way through thanks to convoluted forums from 2003, but it took me a long while to get it right. So, in the spirit of leaving the internet in a better place than when I found it, I’d like to share my solution with you (and future me who has this same issue).
NB: I’m not a sys-admin type. I would be very careful about this. I’m not even all that sure about what’s going on here!
Enable root user
First of all you need to enable the root user. Follow the steps here for that: enable root user on OS X
Type some things in Terminal
Then I typed some things in terminal. Not sure what this did, but it worked.
This turned my Terminal’s typical beginning of every line from
Chases-MacBook-Pro:~ chasereeves$ to
Then I typed in the following and hit enter: make sure you change “USERNAME” to your username
sudo dseditgroup -o edit -a USERNAME -t user wheel
What it’s doing here is adding my user to the
wheel group, which apparently is the badass group you want to be in where all the cool kids can edit files and shit. That did the trick. For good measure I typed the following to list off the groups and users on my computer and, sure enough, my user was in the
dscacheutil -q group
Then I went over to the Finder, right-clicked on Macintosh HD and chose “Get Info”… Under Sharing & Permissions set “wheel” to “read & write.”
Good luck, internet!
Some more goodies to type
In terminal you can simply type
groups and hit enter to see which groups your user falls into.
You can also add your user to the
admin group by typing the following: make sure you change “USERNAME” to your username
sudo dseditgroup -o edit -a USERNAME -t user admin
- How to: Add a user from the OS X command line, works with Leopard!
- osx – How to add user to a group from Mac OS X command line? – Super User
- Configuring sudo and adding users to Wheel group | Linux Blog
PS: here are some of the shitty things I was searching for hours trying to figure this out:
- mac “failed to clear ACL on file”
- chmod 755
- mac lion grant user sudo
- mac lion user access sudo
- mac lion grant sudo privileges to user
- mac allow user to work without password
- mac hard drive is read only
- macintosh HD this location is read only
- mac how to change user to admin
- mac how to add user to wheel group