Questions tagged [sudo]

Used when executing commands as another user.

sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.

via the man sudo command

266 questions
168
votes
11 answers

Can Touch ID on Mac authenticate sudo in Terminal?

Can Touch ID on Mac authenticate sudo in Terminal?
P A N
  • 8,738
  • 19
  • 69
  • 109
67
votes
5 answers

Enable sudo without a password on MacOS

My Problem I would like to be able to run sudo commands on MacOS Sierra 10.12 without having to type a password. What have I tried I've read the following: Why does sudo ask for a password in terminal? allow sudo to another user without…
Adam Matan
  • 3,569
  • 10
  • 35
  • 47
57
votes
7 answers

Why can't I run `su`? (and how should I do?)

Whenever I try to issue su I get this: $ su Password: su: Sorry Needless to say, I'm entering the correct admin password which does work with sudo. What I want is not having to enter sudo each time.
Petruza
  • 2,755
  • 5
  • 29
  • 48
55
votes
2 answers

allow sudo to another user without password

I want to be able to 'su' to a specific user, allowing me to run any command without a password being entered. For example: If my login were user1 and the user I want to 'su' to is user2: I would use the command: su - user2 but then it prompts me…
zio
  • 884
  • 3
  • 8
  • 14
27
votes
5 answers

How do I run terminal in sudo mode?

I was trying to install npm, and I got npm ERR! Error: EACCES, Permission denied '/usr/local/lib/node_modules' npm ERR! npm ERR! Please use 'sudo' or log in as root to run this command. npm ERR! npm ERR! sudo npm "install" "." "--force"…
balexandre
  • 2,773
  • 5
  • 27
  • 38
24
votes
1 answer

Can't write to /usr/lib

I upgraded to OS X El Capitan and tried to install a new app (MPLAB X from Microchip) but I got an error because it couldn't copy a library to /usr/lib even when it asked for root password. I tried to manually copying the library using sudo cp…
Andres
  • 383
  • 1
  • 5
  • 11
23
votes
3 answers

Where will the incident with the sudo command be reported to?

If a non-admin types a sudo command in Terminal, this will appear after they enter their password: User is not in the sudoers file. This incident will be reported. Where is this reported to?
please delete me
  • 1,498
  • 3
  • 19
  • 34
23
votes
3 answers

osascript is not allowed assistive access. (-1728)

Script: #!/usr/bin/osascript tell application "System Preferences" activate set current pane to pane "com.apple.preferences.users" delay 2 tell application "System Events" click radio button "Login Items" of tab group 1 of…
John Shepard
  • 339
  • 1
  • 2
  • 4
21
votes
9 answers

Terminal returns not found for most commands Mac OSX

I'm really new to Mac OSX and UNIX based systems. I wanted to run a few Windows games on my Mac Mini so I started installing Wine and MacPorts. I think the installs are correct, but when I type sudo port install wine I see a not found error in my…
Jack Copeland
  • 213
  • 1
  • 2
  • 4
21
votes
6 answers

How do I reset/recover my superuser password without the boot disk?

I lost the superuser password for my iMac and I don't have the boot disk. I already tried the second answer on this page, but every time I type su from the command prompt, it still asks for a password that I don't have anymore. Is there another way…
Paul
  • 481
  • 2
  • 9
  • 15
16
votes
6 answers

How do I open a file as root in TextEdit on Lion?

How do I open a file as root, in TextEdit? I've tried these commands as root, but TextEdit always say it's locked: open -e /etc/apache2/httpd.conf open -e -F /etc/apache2/httpd.conf open -e -F -W /etc/apache2/httpd.conf And of course sudo !! makes…
Znarkus
  • 1,457
  • 4
  • 16
  • 21
16
votes
1 answer

How to solve "User is not in sudoers file, incident reported"

I added "Syammala Naidu" ALL=(ALL) ALL to /etc/sudoers, rebooted and logged in as Syammala Naidu and run sudo -i. Sudo tells me: user not in sudoers file, incident Reported. How can I fix this?
MacDeveloper
  • 486
  • 1
  • 6
  • 17
16
votes
9 answers

sudo: /etc/sudoers is owned by uid 501, should be 0

To run programs as sudo without password, I edited /etc/sudoers with wrong content. Then I re-edited it with Mac's default text editor(course sudo cannot be used when /etc/sudoers is wrong). I tried to run sudo agin, and get this error: sudo:…
Kane Blueriver
  • 263
  • 1
  • 2
  • 5
14
votes
4 answers

Why is sudo taking way too long?

I recently updated to macOS Sierra 10.12.4 Beta (16E144f) and it might be what is causing sudo to delay up to 10 minutes as it's the most recent change I recall since this problem occurred. I have never had to wait so long for a basic program and…
Spencer Williams
  • 252
  • 1
  • 2
  • 8
14
votes
6 answers

How to fix curl: (60) SSL certificate: Invalid certificate chain when using sudo

So since the Mavericks upgrade curl has more issues with certificates. When trying to curl a file from my web server with it's self-signed certificate it was getting the error "SSL Certificate: Invalid certificate chain". This was corrected by…
Jacob Tomlinson
  • 255
  • 1
  • 2
  • 13
1
2 3
17 18