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.
migrated from stackoverflow.com Jun 29 '11 at 4:22
This question came from our site for professional and enthusiast programmers.
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.