Deleting User from 10.3 with 10.0 Jamf Remote - Not completing

ben_hertenstein
Contributor

Trying to delete a local user from a machine remotely using Jamf remote. Set parameters to completely delete the user and home folder followed by an inventory update. The log shows the user and home folder have been deleted, but the computer and inventory still show user exists. Same results when including an auto or a manual restart of the computer. If I log out as another user and then in as the user account I was trying to delete it asks to continue setup of the account like it is the first time. Such as "Sign In with Your Apple ID". What am I missing?

Yes, I could just delete the user from machine manually, but what is the fun in that.

1 ACCEPTED SOLUTION

mm2270
Legendary Contributor II

Have you tried using sysadminctl to delete the account? I'm not sure dscl . delete is a good way to delete an account anymore under 10.13.

Syntax to use:

sudo sysadminctl -deleteUser <username>

Drop the sudo if it's run from a policy.

View solution in original post

9 REPLIES 9

ben_hertenstein
Contributor

Make that 10.3.1

ben_hertenstein
Contributor

Unable to remove user manually either via system preferences or terminal.

I can see the user with dscl . list /users
but when using sudo dscl . delete /users/<userID> i get an access error

This is student machine that was set up to 13.1 for a new student. Joined JAMF using this account, then added student account and then wanted to go back and delete the original admin account that I joined with.

Not resolved, but changed the accounts password to a 'super secret' one that any kids don't know. Will test with another machine to see if it was machine specific.

ben_hertenstein
Contributor

I was able to reproduce the issue on another machine. Is the user who joins JAMF pro with 10.13.1 not able to be deleted from the computer? Any response is appreciated.

ben_hertenstein
Contributor

https://discussions.apple.com/thread/8087348?start=0&tstart=0

ben_hertenstein
Contributor

http://www.hawkdive.com/2017/01/unable-to-delete-managed-user-account.html

mm2270
Legendary Contributor II

Have you tried using sysadminctl to delete the account? I'm not sure dscl . delete is a good way to delete an account anymore under 10.13.

Syntax to use:

sudo sysadminctl -deleteUser <username>

Drop the sudo if it's run from a policy.

View solution in original post

ben_hertenstein
Contributor

@mm2270 That did the trick! Many thanks!

bvrooman
Valued Contributor

If Jamf Remote is still using dscl and sysadminctl is the preferred way now, that sounds worthy of a support case.

ben_hertenstein
Contributor

It appears to only happen with machines that were moved from 12.6 to 13.0/13.1
A fresh install of 13.0 had no issue when added to MDM. I was able to remove an admin account by Jamf Remote, command line, terminal or policy.

Had some new students that came in and I gave machines that were upgraded vs machines that were erased and then with 13.0