Add user to group wheel

How do I add a user to the wheel group?
Or more specifically, how do I allow TextWrangler to write to /etc/hosts?
Thanks in advance.

Macbook5,2, Mac OS X (10.6.4), Powerbook G4, iMac G4, Powerbook G3 Pismo, iMac G3 Bondi Blue, etc

Posted on Jan 8, 2011 1:11 PM

Reply
16 replies

Jan 8, 2011 1:48 PM in response to J.S. Bach

mac1685 wrote:
Yep - 3.5.
It kinda irks me to revert back to a previous version.


Agreed.
I thought perhaps I could add myself to the wheel group, and fix this problem.
Any other ideas?

One thought I had is in app folder command-i on TextWrangler to open info window. Unlock the padlock and change permissions to read write on wheel.

Report back on your success or failure.

Jan 8, 2011 3:15 PM in response to J.S. Bach

Second and last try to keep you from doing real damage. Don't modify things like system groups and permissions when you don't know what you're doing. If you don't like my suggestion of editing the file in place, then do the following. I'll make this as simple as I can.

1. In the Finder, press the key combination Shift-Command-G.

2. A window with the title "Go to Folder" will open. In the text field, type "/etc" (without the quotes.)

3. Press Return, or click the 'Go' button. A Finder window will open with the contents of /etc showing. Find the file you want and drag it to your Desktop. The file will be copied, not moved.

4. Edit the copy using any editor you want. Save the changes.

5. Open a Terminal window. Drag the following text into the window:
sudo -i

Press Return. Type your password when prompted. Now type:
cat

There's a space after the word 'cat'. Do not press Return or any other key.

6. Drag the icon of the file you just edited from your Desktop into the Terminal window. Some text will appear automatically. Right after that text, type '> '. That's Shift-Period followed by a space.

7. Drag the icon of the original /etc/hosts file from the Finder window into the Terminal window. Click in the Terminal window to bring it forward, then press Return.

8. Verify that the modified hosts file does whatever you're expecting it to do. If it does, you can close the Terminal window and delete the hosts file from your Desktop. If not, revert the changes you made to the copy and repeat the above steps to revert the changes to the original.

Jan 8, 2011 4:04 PM in response to J.S. Bach

Ok.
Here's what did the trick:

1. In Terminal: sudo cp /etc/hosts.backup
2. In Finder: File > Get Info /etc/hosts
3. Go to permissions, and add your username to the list. (You'll have to unlock the permissions section.)
4. Make sure your username has read and write access on /etc/hosts.
5. File > Get Info /etc
6. Add your username to the permissions list, assign your username read/write access.

Now TextWrangler v3.5 should be able to write to /etc/hosts.

If you have a better way, be sure to let men know.

Feb 2, 2011 1:55 AM in response to Linc Davis

Linc Davis wrote:
Second and last try to keep you from doing real damage. Don't modify things like system groups and permissions when you don't know what you're doing. If you don't like my suggestion of editing the file in place, then do the following. I'll make this as simple as I can.

1. In the Finder, press the key combination Shift-Command-G.

2. A window with the title "Go to Folder" will open. In the text field, type "/etc" (without the quotes.)

3. Press Return, or click the 'Go' button. A Finder window will open with the contents of /etc showing. Find the file you want and drag it to your Desktop. The file will be copied, not moved.

4. Edit the copy using any editor you want. Save the changes.

5. Open a Terminal window. Drag the following text into the window:
sudo -i

Press Return. Type your password when prompted. Now type:
cat

There's a space after the word 'cat'. Do not press Return or any other key.

6. Drag the icon of the file you just edited from your Desktop into the Terminal window. Some text will appear automatically. Right after that text, type '> '. That's Shift-Period followed by a space.

7. Drag the icon of the original /etc/hosts file from the Finder window into the Terminal window. Click in the Terminal window to bring it forward, then press Return.

8. Verify that the modified hosts file does whatever you're expecting it to do. If it does, you can close the Terminal window and delete the hosts file from your Desktop. If not, revert the changes you made to the copy and repeat the above steps to revert the changes to the original.





holy crap finally I tried this one and it works wohooo...Im so exited I can barely write...I've been trying to activate php5 for hours and it wouldn't let me because of the group wheel crap finally I try this and VOILA very nice...THNX a lot dude You really saved my day

Message was edited by: Spideruser

Message was edited by: Spideruser

Feb 2, 2011 11:19 AM in response to Spideruser

nano is your friend for a simple edit requiring system privileges.

Macintosh-HD -> Applications -> Utilities -> Terminal


#The sudo command will ask for your administration password. No
# characters will appear when typing your password. Press return
# when done typing.
mac $ sudo cp -i /etc/hosts /etc/hosts.previous
Password:
# The mouse doesn't work. Use the cursor keys to move around.
# Use delete to get rid of a character.
# Frequently used commands are listed out the bottom of screen.
# Confirmation messages appear at bottom too!
# Use control+o to save. The ^ means to use the control key
# plus the letter
mac $ sudo nano /etc/hosts
mac $



Robert

Sep 1, 2011 7:57 PM in response to J.S. Bach

I'm not sure why there's the whole discussion about sudo, nano, vi, etc. (except, maybe, that it's a better way to edit files), but the answer to the original question:


How do I add a user to the wheel group?


Go to System Preferences -> Accounts (or Users & Groups, depending on your OS version), select your account and click the 'Allow user to administer this computer.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Add user to group wheel

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.