• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 352
  • Last Modified:

How can I run RUN as SUDO on a MAC

I'm unable to run RemoteUpdatemanager (RUM) from abobe, on a MAC with Mavericks as SUDO. It prompts for a password, but will not accept it.
  • 2
  • 2
2 Solutions
I believe when you're doing as super user in a Mac's bash terminal, it is prompting for the Root user password.  Make sure the root user account is enabled and then set the password.

See this article here:

Open Users & Groups preferences, click Login Options, then click the lock icon to unlock it. If necessary, type your password, then click Unlock.
In the Network Account Server section, click Join or Edit.
Click Open Directory Utility.
Click the lock icon to unlock it, then enter your administrator name and password.
Do one of the following:

    Choose Edit > Enable Root User, then enter a root user password in the Password and Verify fields.
walkerpsAuthor Commented:
Thanks you for your suggestion

The Root user is enabled. I'm able to run the command logged on as root. When I try to run remoteupdatemanager logged on as the user without admin rights I am prompted to enter a password. When I enter the users password, the error is "user ID" is not in the sudoers file

what I an running:

sudo /usr/bin/remoteupdatemanager
Your user needs to have admin rights to sudo or be in the /etc/sudoers file.  You can't run programs that must be root enabled without the rights.  You normally do this in your Users & Groups System Preferences by enabling the "Allow user to administer this computer".  This adds the user account to the admin group, which already exists in /etc/sudoers.

If you need do a one off and temporarily add the account to /etc/sudoers, but since this is OSX it's much better to add the user to the admin group.  You'll have to use an account with sudo privileges to enable it.  If you're already root, you don't need to use sudo.  This is how you would do it on the command line and it's basically what the checkbox does.
sudo dseditgroup -o edit -a USERNAME -t user admin

To remove or delete the user from the admin group
sudo dseditgroup -o edit -d USERNAME -t user admin

or if you just want the user to have access to the updatemanager, you can do that by adding the user to /etc/sudoers:
echo "USER_NAME   ALL=/usr/bin/remoteupdatemanager" >> /etc/sudoers

Run this to delete it.
sed -i /USER_NAME   ALL=/usr/bin/remoteupdatemanager/d /etc/sudoers

Manually adding the user to /etc/sudoers will be independent and hidden from the System Preferences GUI, so you should remove that line when you're done, otherwise you may lose track and no remember that you gave someone permissions that you shouldn't have.  You should only do this if you're normally managing /etc/sudoers in Linux style and/or want to fine tune what type of permissions each user gets.

No.  The sudo mechanism asks for the User's password.  You shouldn't have to enable the root account password and you never need it to get things done on a Mac.  Redhat and the old unix camps like users to use root, but Mac OSX and Ubuntu Linux(and its variants) rely on sudo to get root access as part of their security.  People that don't ever use ssh keys like to enable root.
walkerpsAuthor Commented:
Thanks for the Info.

What I am trying to accomplish is to be able to run remoteupdatemanager remotely to update adobe creative cloud 2014.
None of my users have local admin rights.

this is what I have added to the sudoers file in /etc :

# User privilege specification
"username" ALL=(root) NOPASSWD: /usr/bin/remoteupdatemanager

Does this allow "username" only access to remoteupdatemanager ?

What is the "correct" way to run a file remotely as root, when the local user does not have admin rights?
Basically, yes, if remoteupdatemanager does everything.

Hopefully, the binary doesn't need to call another binary to run.  You'll have to test it.  The annoying thing about adobe is that it's all GUI on a Mac.  You have to register for a license to repackage it to be able to install it via the command line.  You can command line install adobe on Windows, but you can't with their default installers on the Mac.

I'm not sure about what might be "correct".  Everyone seems to do things differently.  I see blogs now pushing popular but less "correct" information out there and push down the officially documented "correct" method to do things.  I also see many people link to software download aggregator sites instead of the actual product developer sites for software.

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now