Err is a convenient command-line utility for determining error values of error codes from the following header files:
To run Err, open a Command Prompt window and type:
err [value] [value] [value] ...
Where value is some numeric error code value.
Err searches for all of the codes on the command line. If they aren't explicitly hexidecimal (for example, they don't start with "0x" or contain hexadecimal digits), both decimal and hexadecimal variants are searched.
Therefore, "err 0x10" yields:
F:\nt\security\tools\err>err 0x10
# for hex 0x10 / decimal 16 :
ERROR_CURRENT_DIRECTORY winerror.h
KDC_ERR_PADATA_TYPE_NOSUPP kerberr.h
LDAP_NO_SUCH_ATTRIBUTE winldap.h
# 3 matches found for "0x10"
Whereas just "err 10" yields:
F:\nt\security\tools\err>err 10
# for decimal 10 / hex 0xa :
ERROR_BAD_ENVIRONMENT winerror.h
KDC_ERR_CANNOT_POSTDATE kerberr.h
LDAP_REFERRAL winldap.h
# for hex 0x10 / decimal 16 :
ERROR_CURRENT_DIRECTORY winerror.h
KDC_ERR_PADATA_TYPE_NOSUPP kerberr.h
LDAP_NO_SUCH_ATTRIBUTE winldap.h
# 6 matches found for "10"
And "err 1a" (which can only be hexadecimal) yields:
F:\nt\security\tools\err>err 1a
# for hex 0x1a / decimal 26 :
ERROR_NOT_DOS_DISK winerror.h
KDC_ERR_SERVER_NOMATCH kerberr.h
# 2 matches found for "1a"
If you want to search for multiple codes put them all on the command line:
F:\nt\security\tools\err>err 1 2 3 4 5
# for hex 0x1 / decimal 1 :
ERROR_INVALID_FUNCTION winerror.h
STATUS_WAIT_1 ntstatus.h
KDC_ERR_NAME_EXP kerberr.h
LDAP_OPERATIONS_ERROR winldap.h
# 4 matches found for "1"
# for hex 0x2 / decimal 2 :
ERROR_FILE_NOT_FOUND winerror.h
STATUS_WAIT_2 ntstatus.h
KDC_ERR_SERVICE_EXP kerberr.h
LDAP_PROTOCOL_ERROR winldap.h
# 4 matches found for "2"
# for hex 0x3 / decimal 3 :
ERROR_PATH_NOT_FOUND winerror.h
STATUS_WAIT_3 ntstatus.h
KDC_ERR_BAD_PVNO kerberr.h
LDAP_TIMELIMIT_EXCEEDED winldap.h
# 4 matches found for "3"
# for hex 0x4 / decimal 4 :
ERROR_TOO_MANY_OPEN_FILES winerror.h
KDC_ERR_C_OLD_MAST_KVNO kerberr.h
LDAP_SIZELIMIT_EXCEEDED winldap.h
# 3 matches found for "4"
# for hex 0x5 / decimal 5 :
ERROR_ACCESS_DENIED winerror.h
KDC_ERR_S_OLD_MAST_KVNO kerberr.h
LDAP_COMPARE_FALSE winldap.h
# 3 matches found for "5"
Everything that is not an explicit bugcode is prefaced with an octothorpe=number sign (#), and the symbols and headers are separated by blanks, so if you want to search specifically for a kerberos 0x6 error:
err 0x6 | qgrep kerberr.h
F:\nt\security\tools\err>err 0x6 | qgrep kerberr.h
KDC_ERR_C_PRINCIPAL_UNKNOWN kerberr.h
Or, if you want to parse the errors in a script file:
F:\nt\security\tools\err>err 0x6 | qgrep -v # > foo.txt
F:\nt\security\tools\err>for /F "tokens=1-2 " %x in ( foo.txt ) do @echo error 0x6 could be %x in file %y...
error 0x6 could be ERROR_INVALID_HANDLE in file winerror.h...
error 0x6 could be KDC_ERR_C_PRINCIPAL_UNKNOWN in file kerberr.h...
error 0x6 could be LDAP_COMPARE_TRUE in file winldap.h...
The error output always contains human-readable comments regarding the errors to be produced (preceded with an octothorpe = number sign (#)), and is of the form:
[ error symbol ] <whitespace> [filename]
Information in this document, including URL and other Internet web site references, is subject to change without notice. The entire risk of the use or the results of the use of this resource kit remains with the user. This resource kit is not supported and is provided as is without warranty of any kind, either express or implied. The example companies, organizations, products, people and events depicted herein are fictitious. No association with any real company, organization, product, person or event is intended or should be inferred. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation.
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property.
© 1999-2000 Microsoft Corporation. All rights reserved.
Microsoft, ActiveX, Windows and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and/or other countries/regions.
The names of actual companies and products mentioned herein may be the trademarks of their respective owners.