sudo: unable to cache user root, already exists

Discussion in 'OS X Mountain Lion (10.8)' started by haravikk, Jun 30, 2014.

  1. haravikk macrumors 65816

    May 1, 2005
    Encountered this strange error today for the first time. I have a few commands I run regularly via sudo, and one just completed and I wanted to re-run it, but got the following error:

    I've run these commands a hundred times with no issue, it's really just a simple one-way rsync copying data from a folder to a remote server (as a temporary solution until I can automate it), but has to be run as sudo to avoid permissions issues.

    Anyway, now that this error has appeared I can't run anything as sudo, every combination of sudo options that I try returns the above error. I've tried repairing permissions and restarting to no avail. I still appear to have admin rights as far as OS X is concerned, I just don't have access to anything that runs via sudo in the Terminal.

    Not sure if it might be related, but I've also noticed some oddities recently, namely I've been getting warnings that I'm running an application downloaded from the internet, even though I had the exact same version of the program open only the day before, like whatever database tracks that has been corrupted.

    Does anyone know what cache sudo is referring to, and how I might recreate it?
  2. haravikk thread starter macrumors 65816

    May 1, 2005
    I haven't been able to discover the cause of the problem, but I have found a solution. I was able to fix it by running the command:
    sudo -k
    This revokes all sudo permissions and requires you to re-enter your password the next time sudo is used, but doesn't itself require a password. Presumably this destroys any cached credentials, thereby resolving the problem in my case, which must have been a leftover file somewhere.

Share This Page