macOS High Sierra – How to Delete a Standard User

high sierramacos

I created a new Admin account in Sierra High and needed to delete the previous admin account which is marked now as the standard user. However, after unlocking as admin and selecting the respective user that I would like to delete, I see the - sign is marked as Grey.

enter image description here

This is all accounts and I would like to delete the mac user account,

$ dscacheutil -q user | grep -A 3 -B 2 -e uid:\ 5'[0-9][0-9]'
name: mac
password: ********
uid: 501
gid: 20
dir: /Users/mac
shell: /bin/bash
--
--
name: chaklader
password: ********
uid: 502
gid: 20
dir: /Users/chaklader
shell: /bin/bash

How do I delete the respective account? I find a code snippet to run on the terminal, i.e, sudo /usr/bin/dscl . -delete "/Users/mac". Should I try that and will work out?

Update:

As an answer suggested, I'm not logged in to the the fast user switching menu.

enter image description here

As it was asked, I run who in the terminal and get the result,

$ who

chaklader console  Dec 28 06:01 
chaklader ttys000  Dec 28 14:51

So, in brief the other user, mac was not in the terminal.

Best Answer

I had a very similar problem to this. With the help of Apple Support I solved it. I posted the solution here: https://discussions.apple.com/message/33849669

Repeating that here, it is:

  • Boot into the recovery partition.
  • Choose Terminal from the Utilities menu --> Terminal should appear.
  • Enter: resetpassword at the prompt and hit return --> a new window/app should appear behind the Terminal window called "Reset Password"
  • Go through the steps to reset the password for the account you're trying to delete.
  • Restart the Mac and log back in as your main admin account.
  • Go to Users & Groups System Preferences pane, select the account you're trying to delete and hit the minus button.

Fixed it for me. Hope this helps!