Why is Terminal rejecting my correct password?

2024 MBA M3 13" Sequoia 15.0.1


Trying to get rid of the caps lock key indicator that crops up constantly in Pages -- I think it was new in Sonoma and raised a real stink, which the tech folks never read about here because here it is in Sequoia too. Apparently you have to enter a Terminal command instead of having a simple on-off option. So anyway, I tried a Terminal command someone had written -- a sudo thing (which I'd never heard of before since I don't Terminal).


So...

1) I couldn't execute the command because Terminal keeps rejecting my admin password, and after three attempts shuts me out. I know I'm entering it correctly, but just in case I'm mistaken about which password is my admin one, I entered both my Apple ID and my computer passwords -- making sure to type them correctly. Didn't help -- rejected every time. Anybody got any ideas and cures?

2) Will the sudo command written for Sonoma work for Sequoia?


Thanks all -- still getting used to my new MBA.

MacBook Air 13″, macOS 15.0

Posted on Oct 18, 2024 5:47 PM

Reply
Question marked as Top-ranking reply

Posted on Oct 18, 2024 9:04 PM

Make sure the Caps Lock key is not enabled when typing the password.


Since the keys you type when entering the password are not mirrored on the screen, make sure you type it carefully. Maybe do the hunt & peck method to ensure you are not accidentally hitting an extra or wrong key.


Double check that each character of your password can be typed on screen in the Terminal....best to randomize the typing of those characters (do not press the "Return" key or your password will be stored in the Terminal history which would be bad. Use the "Delete" key to delete the test characters so they are not stored in the Terminal history.


Is your macOS user account an admin account? Is this Mac being managed or restricted so that you may not actually be allowed to perform "sudo" related actions?


I just used the command line to disable the blue Caps Lock indicator marker on my macOS Ventura system using the following command:

sudo  defaults  write  /Library/Preferences/FeatureFlags/Domain/UIKit.plist  redesigned_text_cursor  -dict-add Enabled  -bool NO


Reference:

https://stackoverflow.com/a/77296786


I have no idea if that will still work with Sequoia. Your password acceptance issue is something different & is unrelated to whether this command is compatible with Sequoia.


You should also beware that comments on the linked forum article mentioned that some GUI apps may lose their blinking text cursor when disabling the blue Caps Lock indicator (see comment #3 for the linked post).


Here is an article which has two other options for disabling the blue Caps Lock indicator:

https://www.macobserver.com/tips/how-to/disable-caps-lock-indicator-sonoma/


I agree the blue Caps Lock indicator is ridiculous & annoying serving absolutely no purpose 99.9% of the time (entering the password on the command line is one rare exception where it could be useful since text is not shown on screen). After all seeing upper case characters as you type is pretty clear the Caps Lock is enabled.


11 replies
Question marked as Top-ranking reply

Oct 18, 2024 9:04 PM in response to william98

Make sure the Caps Lock key is not enabled when typing the password.


Since the keys you type when entering the password are not mirrored on the screen, make sure you type it carefully. Maybe do the hunt & peck method to ensure you are not accidentally hitting an extra or wrong key.


Double check that each character of your password can be typed on screen in the Terminal....best to randomize the typing of those characters (do not press the "Return" key or your password will be stored in the Terminal history which would be bad. Use the "Delete" key to delete the test characters so they are not stored in the Terminal history.


Is your macOS user account an admin account? Is this Mac being managed or restricted so that you may not actually be allowed to perform "sudo" related actions?


I just used the command line to disable the blue Caps Lock indicator marker on my macOS Ventura system using the following command:

sudo  defaults  write  /Library/Preferences/FeatureFlags/Domain/UIKit.plist  redesigned_text_cursor  -dict-add Enabled  -bool NO


Reference:

https://stackoverflow.com/a/77296786


I have no idea if that will still work with Sequoia. Your password acceptance issue is something different & is unrelated to whether this command is compatible with Sequoia.


You should also beware that comments on the linked forum article mentioned that some GUI apps may lose their blinking text cursor when disabling the blue Caps Lock indicator (see comment #3 for the linked post).


Here is an article which has two other options for disabling the blue Caps Lock indicator:

https://www.macobserver.com/tips/how-to/disable-caps-lock-indicator-sonoma/


I agree the blue Caps Lock indicator is ridiculous & annoying serving absolutely no purpose 99.9% of the time (entering the password on the command line is one rare exception where it could be useful since text is not shown on screen). After all seeing upper case characters as you type is pretty clear the Caps Lock is enabled.


Oct 19, 2024 11:23 AM in response to william98

No, it is not your AppleID password.


If you have an admin account on the computer (and if this is the only account, it will be the admin account), then the password required by sudo is the computer login password - that is the same one you enter when you restart, log in or unlock the screen (unless you have Touch ID active of course, then you only really the login password sometimes).


Now, if you are one of those folks who have an different admin account and use a standard account for their daily business, then things are a bit different. But it doesn't sound like that is the case.


Leaving aside what you are trying to do specifically, what happens if you just try the following:


sudo su


That should just try to change your interactive shell from your account to the root account - the most basic sudo command you can do.

Oct 19, 2024 1:02 PM in response to william98

william98 wrote:

I am a bit unclear on what an admin pw is: I thought it was the AppleID password, so that's what I was trying.

No, the AppleID has nothing to do with the command line.


My computer unlock pw is different but I was trying that one too -- is that the admin password?

Yes, that is the one assuming your macOS user account is an admin account. Check the "Users & Groups" System Settings to make sure your macOS user account is shown as an Administrator.


Can you unlock your user account using the login password? Try clicking the padlock in System Settings to confirm the password works within macOS. The password used to unlock either one is what is needed on the command line. Make sure the username shown on the login prompt and on the prompt to unlock the padlock in System Settings is the same as your macOS user account.


This is the command line I was trying: sudo mkdir -p /Library/Preferences/FeatureFlags/Domain && sudo /usr/libexec/PlistBuddy -c "Add 'redesigned_text_cursor:Enabled' bool false" /Library/Preferences/FeatureFlags/Domain/UIKit.plist && sudo shutdown -r now

It looks a bit different than yours. And somebody else posted a Script Editor command that people said worked, but I haven't tried it -- don't know if I'd need a password or not.

It looks like one of the other two options included in the second link I provided to MacObserver article.


Maybe I should just call Apple? Though redditors reported not much help there.

You may need someone to actually look at the system to confirm the reason for the problem. It is much harder to assist remotely since we cannot directly observe anything on the system.

Oct 19, 2024 11:40 AM in response to william98

Yes, it works in Sequoia. I applied it as soon as I found out about it.


To disable the indicator, copy-paste the following into Terminal and press Enter (triple click the line):


sudo defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist redesigned_text_cursor -dict-add Enabled -bool NO


Terminal will then ask for your admin password. Enter that, then close Terminal and restart the Mac. The icon will be gone.


To enable the indicator, copy-paste the following into Terminal and press Enter (triple click the line):


sudo defaults write /Library/Preferences/FeatureFlags/Domain/UIKit.plist redesigned_text_cursor -dict-add Enabled -bool YES


Terminal will then ask for your admin password. Enter that, then close Terminal and restart the Mac. The icon will reappear.

Oct 19, 2024 1:22 PM in response to Kurt Lang

I think it worked! CAPS lock on, no icon!


It took following those instructions at the link into Settings/Users/Advanced and that's where the zsh thing was. And then back to Terminal and the pw worked, entered your command, and voila!

Can't thank you enough -- that thing was maddening, like a gnat flying around your head when you're trying to read.

Oct 19, 2024 10:47 AM in response to HWTech

Thanks for this. I did make sure Caps Lock wasn't on, and I did the hunt&peck method, so I'm sure I entered the pw correctly. I am a bit unclear on what an admin pw is: I thought it was the AppleID password, so that's what I was trying. My computer unlock pw is different but I was trying that one too -- is that the admin password? Neither one of them worked. I'll check out that link, but if any method disabling the Caps Lock indicator requires Terminal, I'm in trouble.


This is the command line I was trying: sudo mkdir -p /Library/Preferences/FeatureFlags/Domain && sudo /usr/libexec/PlistBuddy -c "Add 'redesigned_text_cursor:Enabled' bool false" /Library/Preferences/FeatureFlags/Domain/UIKit.plist && sudo shutdown -r now


It looks a bit different than yours. And somebody else posted a Script Editor command that people said worked, but I haven't tried it -- don't know if I'd need a password or not.


This password issue wasn't a problem on the rare times (maybe twice in 10 years!) I used Terminal on my 2013 MBA (though I hadn't tried it since I updated to Mojave a few months ago, and then to Big Sur), so I'm perplexed. Maybe I should just call Apple? Though redditors reported not much help there.


Thanks again for your detailed reply -- much appreciated.

Oct 19, 2024 1:14 PM in response to g_wolfman

Then I was using the right password -- the computer sign-in.


When I typed sudo su, I hit return, then the password and hit return, and what I got was "Sorry, try again."


After "Password" there is a vertical key icon -- don't know what that means or if it matters here.


At the very top of the Terminal window, it says "last login" with the date (Oct. 18) and time and "on ttys000"


So this is what I'm seeing:

Last login: Fri Oct 18 14:22:42 on ttys000


The default interactive shell is now zsh.

To update your account to use zsh, please run `chsh -s /bin/zsh`. [I tried to run this, but it rejected my password]

For more details, please visit https://support.apple.com/kb/HT208050. [I just now did this -- I had to enter my password there, and I was able to change it to zsh]

[William98's] MacBook-Air-684:~ [myname]$ sudo su

Password: [entered correct pw, seems to have worked because of zsh (?) because I got...]

sh-3.2#

Is that what should have appeared? So now I might be able to enter the command line to kill the caps lock indicator?








Oct 19, 2024 1:21 PM in response to william98

The vertical key is just an icon indicating that a password is being entered and you won't see it when you type.


Looks like by the end of it, it worked, since $ in your prompt indicates a standard shell and # indicates a root shell. Seems like your terminal was stuck somewhere between Bash and Zsh, maybe because you use it but only very infrequently...hard to say.


In any case, you could retry that command now that sudo seems to be working.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Why is Terminal rejecting my correct password?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.