Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to follow some instructions to install cocos2d on my Mac using a command with the sudo command.

But when I try, it tells me Jimmy is not in the sudoers file.

I'm using the latest version of Snow Leopard.

share|improve this question

migrated from Jun 29 '11 at 4:22

This question came from our site for professional and enthusiast programmers.

up vote 3 down vote accepted

Actually, all you need to do is add that user to the admin group - you need to have access to an account that can sudo (or single user mode - see below), and the command should be sudo adduser name_of_user admin - this adds you to the admin group, so you can use sudo.

the sudoers file stores groups, and when and how they're able to elevate themselves to admin/root equivalent privileges. This is safer than root, since your account loses those privileges once you are done. It is NOT a way to add a single account to be able to use sudo.

If you DO need to edit the sudoers file for some reason...(you don't)...

in general, you do NOT edit the visudo file manually - you use 'visudo' in order to edit it - it starts up vi and lets you edit it. You'll need root access for that - if you don't know the root password, you would need to boot into single user mode do do this. The exact edits depend on what's needed, but adding a user to the sudoers file isn't one of them to my recollection.

Knowledge of Vi or how to switch the editor is essential to use visudo.

for the latter

type in EDITOR=/usr/bin/nano sudo visudo - this should use nano instead of vi - nano is much simpler.

share|improve this answer
Thanks for your answer, I was able to install cocos2d after editing the file. I have root password, but my account was set to standard after a friend told me it was 'safer'. Thankyou very much. – Jimmy Luong Jun 30 '11 at 1:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.