Fix sudo Permissions in Terminal When Privileges Does Not Work

Issues

  • I need to use sudo in Terminal, but the permissions do not work.
  • I requested administrator access with the Privileges app, but Terminal still denies sudo.
  • Why does sudo fail in Terminal even though I am an administrator?
  • How do I get sudo permissions to work in Terminal on my Bowdoin Mac?
  • I cannot install command-line tools because sudo is not recognized.

Environment

This article applies to Bowdoin faculty and staff using a Bowdoin-issued Mac. Sudo (superuser do) permissions may be needed to install command-line tools or run some packages in macOS. Faculty and staff are not made direct administrators of their computers, but a small application called Privileges is installed that lets them become an administrator temporarily.

Resolution

The Terminal app reads permissions when the application loads. If a request for administrator privileges is made after Terminal has already been opened, those permissions are not recognized. For macOS to recognize sudo ability in Terminal, administrator privileges must be requested with the Privileges app before Terminal is opened.

  1. Close Terminal. Make sure the Terminal application is completely closed.
  2. Open the Privileges app. Use the Privileges app to request administrator privileges.
  3. Open Terminal. After gaining administrator privileges through the Privileges app, open the Terminal application.

macOS will now recognize your sudo ability in Terminal.

Additional Help

If you need further assistance, you have several options:

  • Bowdoin Bot: Chat with Bowdoin Bot directly from any KB page for instant answers.
  • Phone: Call the Bowdoin College Service Desk at (207) 725-3030.
  • In person: Visit the Tech Hub in Smith Union during business hours.
  • Submit a ticket: Request assistance through the Service Catalog.