def user_create_min(attribs, dir_info)
      attribs = user_record_name_alternatives(attribs)

      check_critical_attribute( attribs, :record_name )
      attribs    = tidy_attribs(attribs)

      command    = {action: 'create', scope: 'Users', value: nil, attribute: nil}
      user_attrs = attribs.merge(command)

      dscl( user_attrs, dir_info )

      answer          = []
      attribs[:value] = nil
      answer         << dscl( user_attrs, dir_info )
      attribs[:value] = nil
      answer         << user_set_password(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_shell(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_last_name(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_real_name(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_unique_id(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_primary_group_id(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_nfs_home_directory(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_enable_login(attribs, dir_info)      if
                        attribs[:enable]&.eql? 'true' or attribs[:enable]&.eql? true
      answer         << user_disable_login(attribs, dir_info) unless
                        attribs[:enable]&.eql? 'true' or attribs[:enable]&.eql? true
      return answer
    end
def user_create_min(attribs, dir_info)
      attribs = user_record_name_alternatives(attribs)

      check_critical_attribute( attribs, :record_name )
      attribs    = tidy_attribs(attribs)

      command    = {action: 'create', scope: 'Users', value: nil, attribute: nil}
      user_attrs = attribs.merge(command)

      dscl( user_attrs, dir_info )

      answer          = []
      attribs[:value] = nil
      answer         << dscl( user_attrs, dir_info )
      attribs[:value] = nil
      answer         << user_set_password(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_shell(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_last_name(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_real_name(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_unique_id(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_primary_group_id(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_set_nfs_home_directory(attribs, dir_info)
      attribs[:value] = nil
      answer         << user_enable_login(attribs, dir_info)      if
                        attribs[:enable]&.eql? 'true' or attribs[:enable]&.eql? true
      answer         << user_disable_login(attribs, dir_info) unless
                        attribs[:enable]&.eql? 'true' or attribs[:enable]&.eql? true
      return answer
    end
https://images.apple.com/server/docs/Command_Line.pdf
 https://serverfault.com/questions/20702/how-do-i-create-user-accounts-from-the-terminal-in-mac-os-x-10-5?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
 https://superuser.com/questions/1154564/how-to-create-a-user-from-the-macos-command-line