It's quite possible that not all users in /var/cpanel/users have DKIM enabled, so that might be why some of them are failing to uninstall when you issue that command.
Also, keep in mind that if you are wanting to mass deactivate DKIM and then reinstall it with the purpose of upgrading weak DKIM keys to 1024-bit keys, I don't think this will do it.
Unless something has changed, in order to upgrade an account with 512-bit keys to 1024-bit DKIM keys, you have to (a) uninstall DKIM from the account, (b) remove the associated keys from /var/cpanel/domain_keys/public and /var/cpanel/domain_keys/private, and (c) then re-install DKIM on the account.
NOTE: Do NOT remove everything from /var/cpanel/domain_keys/public and /var/cpanel/domain_keys/private unless you understand what you are doing.
mike
not work
Code:
root@zeus [~]# for user in `ls /var/cpanel/users`; do /usr/local/cpanel/bin/dkim_keys_uninstall $user; done
/usr/local/cpanel/bin/dkim_keys_uninstall: usage: /usr/local/cpanel/bin/dkim_keys_uninstall <user> at /usr/local/cpanel/bin/dkim_keys_uninstall line 20.
/usr/local/cpanel/bin/dkim_keys_uninstall: usage: /usr/local/cpanel/bin/dkim_keys_uninstall <user> at /usr/local/cpanel/bin/dkim_keys_uninstall line 20.