Posted on 07-11-2024 12:20 AM
Hi,
How can I create new admin user using command line and user home will be delete automatically when remove from System Preferences?
I successfully create new admin user using the following command but when I delete this user from system preferences the home folder will not delete automatically compare to users create manually from system preferences.
Any advice?
Thank you
sudo sysadminctl -addUser Admin -fullName "Admin" -password admin123 -home /Users/admin -shell /bin/zsh -admin
Solved! Go to Solution.
Posted on 07-11-2024 04:58 AM
@yjian Have you tried using the sysadminctl command without the -home option? Specifying the home directory is optional, and if you do specify a home path instead of allowing the sysadmin to create a home directory in the default location (which is what you appear to be trying to do) it may be treated differently when it comes to deletion.
Posted on 07-11-2024 04:58 AM
@yjian Have you tried using the sysadminctl command without the -home option? Specifying the home directory is optional, and if you do specify a home path instead of allowing the sysadmin to create a home directory in the default location (which is what you appear to be trying to do) it may be treated differently when it comes to deletion.