In order to automatise check of printers, I would like to call rpc commands such as  enumprinter or enumdriver.How to make it without connecting to the SMB domain but directly as root?With rpcclient Domain credential must be provided.  With smbclient I can only get the list of shared printers.
How to list printers drivers without credential with Samba?
samba
Depending on the setup of the machines in question, you may be able to use rpcclient as the anonymous user:rpcclient -U  -N -c enumprinters YOURMACHINENote that this may not work for Windows machines with the default group policy, but should work for most Samba setups.