Hidden Admin User?? Cannot SU SUDO from Terminal

Discussion in 'macOS' started by BlueSkyBlueWind, Aug 10, 2009.

  1. BlueSkyBlueWind macrumors newbie

    Apr 10, 2009
    I have a Mac Mini. When I launch Terminal, the user name is not what I have in the Account (System Pref.)

    The prompt shows as "XXXXX ~Mac Mini:"

    Mac Mini is the name of the Admin User that I log into the system with... but not sure where that XXXXX comes from. (It's not XXXXX but actually a name of another computer that used to be in the home network before I bought this Mac Mini)

    When I try to change user in Terminal, by typing SU SUDO, it asks for password, but my admin password is not accepted.

    What's going on?
  2. mkrishnan Moderator emeritus


    Jan 9, 2004
    Grand Rapids, MI, USA
    Do you have your system set up to let you log in automatically by any chance? Try the whoami command to see what the logged in user is from the terminal if you need to verify that. However, the way the prompt is laid out, the format is name of computer:~ username, I think. So that part you xxx'd out is what the Mac Mini thinks its network name is (which can be changes from the control panel).

    EDIT: Also FWIW you should respond to the sudo challenge with your user password (the user Mac Mini -- the same p/w that user would use to login if required to provide password at login) and not a master password, if you have one established.

    EDIT: Also sorry for all the edits, but you should probably try a different way of fixing escalated permissions, such as sudo bash.

    Ahhh, actually I think this is your problem.

    su sudo

    Means to switch to the user "sudo." Unless you've established a user sudo, this attempt will always fail because, as there is no user named sudo, there is no correct password for the user named sudo. Again, try sudo bash.

    Perhaps also post a screen capture.
  3. colocolo macrumors 6502

    Jan 17, 2002
    Santiago, Chile
    That is a network issue, it is not related to the computer.
    If you log in to an enterprise account which has the IP's predesignated, you will face the same issue in Terminal.
  4. Darth.Titan macrumors 68030


    Oct 31, 2007
    Austin, TX
    In Terminal, the XXXXX before your user name is the computer name. This is set in System Preferences->Sharing. You can change it there and reboot to see the difference in Terminal.

    If you want to change users in terminal, you should use
    su <username>
    where <username> is the user you want to switch to.

    If you're using
    su sudo
    you're trying to switch to the user "sudo" which I'm willing to bet doesn't exist. That's why it's not working. "sudo" is a different command altogether. try "man su" for more info.

Share This Page