diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 52548106b0c160e7786d6d96e384db1e47c8981f..f628ac9121f9bb778ebe067cf7e4b3dba420705f 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -116,8 +116,8 @@ production: &base
   # ==========================
 
   ## LDAP settings
-  # You can inspect the first 100 LDAP users with login access by running:
-  #   bundle exec rake gitlab:ldap:check[100] RAILS_ENV=production
+  # You can inspect a sample of the LDAP users with login access by running:
+  #   bundle exec rake gitlab:ldap:check RAILS_ENV=production
   ldap:
     enabled: false
     host: '_your_ldap_server'
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index 20d5f03d6ef04716fc9e47a7eacf10e3f312498a..461e70ea44eed5f59c9c5ffb2cb90cb29d43f3e4 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -682,6 +682,8 @@ namespace :gitlab do
 
   namespace :ldap do
     task :check, [:limit] => :environment do |t, args|
+      # Only show up to 100 results because LDAP directories can be very big.
+      # This setting only affects the `rake gitlab:check` script.
       args.with_defaults(limit: 100)
       warn_user_is_not_gitlab
       start_checking "LDAP"