[Samba] Query samba for printer driver state

Gerald (Jerry) Carter jerry at samba.org
Wed Jun 14 20:26:04 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ryan Suarez wrote:
> Greetings,
> 
> We're running samba 3.0.22 on debian sarge.
> 
> We use the following instructions to set the 
> device mode on new printers:
> http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/classicalprinting.html#prt-modeset
> 
> How do we query samba to see if a given printer share 
> has it's driver device mode set or not?

$ bin/net -S maple -U% rpc registry enumerate \
"hklm\system\currentcontrolset\control\print\printers\${printername}"

And look for

Valuename  = Default Devmode
Type       = REG_BINARY
Data       =

If you the printer has a device mode, it will return
that registry value.




cheers, jerry
=====================================================================
Samba                                    ------- http://www.samba.org
Centeris                         -----------  http://www.centeris.com
"What man is a man who does not make the world better?"      --Balian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFEkHDcIR7qMdg1EfYRAiOgAJ9JCuZGXvo4ZsdtwBi5r99TMN5kJwCguINc
GXbwOXoyT5t3UWt96bE8Xgk=
=36mY
-----END PGP SIGNATURE-----


More information about the samba mailing list