dscl and sysadminctl command

Asifahmed
New Contributor III

What is the main difference between dscl and sysadminctl commands in macOS?

4 REPLIES 4

sdagley
Esteemed Contributor II

@Asifahmed In a nutshell the sysadminctl command is the modern tool for user account creation, change, and deletion where most tasks can be done with a  single command. The dicl command only does part of the work for you because it's only for manipulating the Directory Services database, and if you're using it in your workflow to add or delete accounts there are additional commands/tools required. 

Asifahmed
New Contributor III

dscl can manage LDAP user what I think, sysadminctl can do the same also?

sysadminctl can do same as profile command?

sdagley
Esteemed Contributor II

What exactly are you trying to do with dscl or sysadminctl? My recommendation would be to look at the sysadminctl tool and if it has the capability to do what you need (e.g. create or delete a user account) then use it.

What exactly are you asking by "sysadminctl can do same as profile command"? sysadminctl is a tool for administering user accounts, it's not a configuration profile tool. 

Asifahmed
New Contributor III

make sense, profile command deals with config profile only as per Apple site. Thanks for clarification.