Use the sudo command while logged into a standard account using an admin password?

Discussion in 'macOS' started by frozencarbonite, Apr 22, 2015.

  1. frozencarbonite macrumors 6502

    frozencarbonite

    Joined:
    Aug 3, 2006
    #1
    I have recently done a total clean reinstall of OS X Mavericks. When the machine first started up, I created my account like normal (which is an Administrator account). I don't like running in an Admin account all the time, so I created a "new" Administrator account called "Admin" and switched the account I originally created to a Standard account.

    Now, I was trying to run a 'sudo' command in Terminal for creating a USB installer of Yosemite. When it asks me for my password, I input the password of the "new" Admin account, which I figured would work. It doesn't. When I log in to that "new" Admin account and run the command, it works fine. Or if I go in the "Users" in "Preferences" and check the box to "Allow user to administer this computer" on my Standard account and run the command again, it works.

    So my question is, is this normal to only be able to use the 'sudo' command while logged in to an Administrator account? I would think that you could use the 'sudo' command in any account as long as you have an Administrator password.
     
  2. Fuzzy Dunlop macrumors member

    Fuzzy Dunlop

    Joined:
    Jan 28, 2014
    #2
    By default, yes. The root user is disabled. To use sudo with a standard user, the user needs to be in the sudoers file. You would then use your own password.
     

Share This Page