Help with sudo and su

Discussion in 'OS X Mountain Lion (10.8)' started by BobRon, Jun 26, 2013.

  1. BobRon macrumors member

    Joined:
    Oct 13, 2012
    #1
    Hi.
    I need to uninstall some software using a sudo command, but when I type the admin password, it doesn't work!
    I try doing:
    Code:
    sudo su
    with the admin password, but it says
    Code:
    Sorry, try again.
    I enabled root user and try
    Code:
    su
    but it also says
    Code:
    su: Sorry
    I repaired disk permissions and everything BUT IT STILL DOESN'T WORK!!
    :mad::mad::mad::mad::mad::confused::confused::confused::confused::confused::confused::eek::eek::eek::eek::eek:
    Yes, the admin is the original account created with this mac
     
  2. jpenguin macrumors member

    Joined:
    Jul 21, 2008
    #2
    to use sudo, you account needs to be 'allowed to administer'

    su can be used to switch to any user,

    su shortusername -


    to switch to root, you can use

    su -

    or

    sudo su -
     
  3. jpeezy macrumors regular

    Joined:
    Feb 24, 2010
    #3
    sudo uses your password not the root password.
     
  4. benwiggy macrumors 68020

    Joined:
    Jun 15, 2012
    #4
    Any reason you don't just use sudo rm <files> ....?
    As said, the password must be valid for an admin account.

    If you enabled the root user, and logged into it, then you should be able to delete anything anything without using sudo. Root has access to everything.
    Make sure you disable the root user when you're done.

    Repair Permissions rarely does much. If a genuine admin account password doesn't work, sounds like the sudoers file has got corrupted somehow.
     
  5. BobRon thread starter macrumors member

    Joined:
    Oct 13, 2012
    #5
    well, i manually edited the sudoers file to include a different admin specifically, and it worked!:D But i can't use my current original admin account :(
     

Share This Page