Admin Password Rejected By Terminal

old pal

Registered
I am trying to execute the sudo command in terminal. The following is a screen shot.



When I type the proper admin's password, it is rejected. The account used is for a standard user, but is allowed to administer the computer. When executed from the admin's account, the password is accepted. What's going on and also what is that "key" symbol?
 

DeltaMac

Tech
Which do you have?
An Admin account, or a standard account?
A standard user that is allowed in Users & Groups pane, to administer the computer, means that you don't have a standard account. The Users & Groups pane will show that your account is an Admin account.

Check your Users & Groups pane, in the System Preferences. The accounts are listed there, along with the type of account.
If you are a Standard account, then that's why.
You have to be logged in to an Admin account before you can use a sudo command in the terminal.
A standard user cannot perform a sudo command.

If you DO have an Admin user, and it is your current user (you are logged in to that Admin account), and it still won't accept your password, then likely you are not using the correct password.
Also, don't forget that you won't see the password as you type it in, as the terminal does not show your password in any way, not even a row of * * * * * :D
You type the password without seeing anything as you type, then press enter.

There is another method that allows you to do a sudo command.
Type the command su AdminUserName, then press enter. (Replace AdminUserName with your actual admin user name.) You will then enter the password for that admin user, and a NEW window will open showing the admin user in the prompt (not your standard user name), and enter your sudo command. It will ask for your password (for that admin user), and the sudo command should run.
 

old pal

Registered
Which do you have?
An Admin account, or a standard account?
A standard user that is allowed in Users & Groups pane, to administer the computer, means that you don't have a standard account. The Users & Groups pane will show that your account is an Admin account.

Check your Users & Groups pane, in the System Preferences. The accounts are listed there, along with the type of account.
If you are a Standard account, then that's why.
You have to be logged in to an Admin account before you can use a sudo command in the terminal.
A standard user cannot perform a sudo command.

If you DO have an Admin user, and it is your current user (you are logged in to that Admin account), and it still won't accept your password, then likely you are not using the correct password.
Also, don't forget that you won't see the password as you type it in, as the terminal does not show your password in any way, not even a row of * * * * * :D
You type the password without seeing anything as you type, then press enter.

There is another method that allows you to do a sudo command.
Type the command su AdminUserName, then press enter. (Replace AdminUserName with your actual admin user name.) You will then enter the password for that admin user, and a NEW window will open showing the admin user in the prompt (not your standard user name), and enter your sudo command. It will ask for your password (for that admin user), and the sudo command should run.
DeltaMac, you have been a Godsend. I was an Admin user with a blank password, but entered the password for my main Admin user. After setting a non-blank password, everything worked. After executing the sudo command, I reverted to a Standard user. Thank you so much, you cleared everything up. I tried the MacOS forum at the Apple Communities site, but got nowhere.
 

DeltaMac

Tech
That's one thing to remember, that having no password (blank) is not always to your advantage!
The terminal doesn't know how to deal with a blank password, particularly when you are trying to elevate the user to a higher authentication level
The sudo command elevates the admin user temporarily to a "superuser".
And, you also likely discovered that you can't remove an actual password, and revert to a blank password, once you have created a password.
Of course, you can still have your system login automatically at boot, so having an actual password doesn't prevent that. Unless you then decide to turn on File Vault. You would always have to authenticate with a password if you protect your hard drive with the encryption of File Vault - but, that's up to you... :D
 
Top