Posted on 10-10-2016 11:54 AM
If I create a hidden account with the JAMF binary below, how can I delete the account or how can I unhide it?
This is how I create it:
sudo jamf createAccount -username localadmin -realname Local Admin -password P@ssw0rd -admin -hiddenUser
This creates an account in /private/var/localadmin
I have then tried to change the ID and or deleting it with DSCL, but I keep getting an error.
sudo /usr/bin/dscl . -delete /private/var/localadmin
delete: Invalid Path
<dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)
Solved! Go to Solution.
Posted on 10-10-2016 11:37 PM
That's because where the user account is in the database is not where the folder itself is located!
Try the following:
sudo /usr/bin/dscl . -delete /Users/localadmin
Posted on 10-10-2016 11:37 PM
That's because where the user account is in the database is not where the folder itself is located!
Try the following:
sudo /usr/bin/dscl . -delete /Users/localadmin
Posted on 10-11-2016 11:17 AM
Doh! You're right @franton. I thought all hidden users went into /private/var in the database also. Thanks for setting me straight.
Posted on 11-28-2018 02:02 AM
Just came across this thread and it's saved what little hair I have from being ripped right out. I'm new to JAMF and scripting, so thanks for the script.
Thanks
Posted on 02-01-2024 11:26 PM
Trying too delete user/admin account, which took over my admin control, in terminal and it wants a password