How can I run RUN as SUDO on a MAC

Posted on 2014-09-02
Last Modified: 2014-10-01
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.
Question by:walkerps
    LVL 4

    Expert Comment

    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.

    Author Comment

    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
    LVL 27

    Assisted Solution

    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.

    Author Comment

    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?
    LVL 27

    Accepted Solution

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Title # Comments Views Activity
    Survey software 5 36
    Tool to email me when a website changes 29 87
    I need a software suggestion 4 59
    Dropbox 3 40
    Let’s list some of the technologies that enable smooth teleworking. 
    In our personal lives, we have well-designed consumer apps to delight us and make even the most complex transactions simple. Many enterprise applications, however, are a bit behind the times. For an enterprise app to be successful in today's tech wo…
    This video shows how use content aware, what it’s used for, and when to use it over other tools.
    The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now