How to Switch to an Admin User in Terminal to Run Sudo Commands on a Mac

preview_player
Показать описание
This video shows you how to user Terminal on a Mac to switch to an elevated admin account and run sudo commands. This is useful when you are logged into a standard account and need to run sudo commands with terminal, but cannot unless you have admin privileges.
Рекомендации по теме
Комментарии
Автор

Super userful, thanks! Appreciate the quick and clear tut.

billselak
Автор

Saved my day. Many-many thanks to You Sir! 🙏

MeanMaoriMean
Автор

This worked for me on MacOS High Sierra 10.13.3. Thanks!

gp
Автор

You did not even help bro I’m tryna figure out how to enter password

Pantherblox
Автор

I needed to switch to admin because I'm using symbolic links. When I start the command it says permission denied. Any idea?

milesfabishak
Автор

thanks! How do I get out of sudo command on terminal? I got stuck there and don't know how to switch now. Thanks!!

AnaMercedesRueda
Автор

That works on Sierra... it works on High Sierra also, except you have to put up with some complaints from OS X. After you su to the Admin user & enter the password, you'll get a message that goes something like this:

"shell-init: error retrieving current directory: getcwd: cannot access parent directories: Permission denied".

However, if you pay attention, you'll see at the prompt that you are the Admin user now (assuming you entered the userid & pw correctly). You can confirm this by entering `whoami`. When you finish, simply type `exit`, and return to your regular user account.

seamusdemora
Автор

What is when you inter the password has a key?

courtneyritter
Автор

m getting below error
bash-3.2$ sudo jamf policy
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin

rajankumar-upck
Автор

does this harm your computer in any other way?

helenastahl
Автор

How do i know the password and/or how i get it?

KiaraYou
Автор

I am the only user/admin on my computer other than the guest. Should I not be able to install something from the terminal? Or do I not understand what's going on here? Thanks.

blusanders
Автор

its not allowing me to enter my password in command prompt, im typing but nothing happening. how do I fix this issue?

datboynat
Автор

I don’t know the password for the admin user. If I did I wouldn’t need to bypass in terminal

Antferguson_Photography
Автор

i put in my password, hit enter and it just said sorry no idea what that means i'm obviously the only one using my computer so why wouldn't my login password be the correct password?

pokefan
Автор

HELP! Is there a way instead of manually typing the password, to create a bash script that will enter the usernames PASSWORD automatically????

chrisfrieberg
Автор

what password do we put in ours or the other accounts

mohammednawrani
Автор

How can you figure out ur administrators username

lillidawson