Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1133 lines
32 KiB

  1. D:\WINNT.2\system32>set PE=/pe:s
  2. D:\WINNT.2\system32>set AN=/ANSI
  3. D:\WINNT.2\system32>rem Test generic creds
  4. D:\WINNT.2\system32>crtest /w:ta /ty:g /pe:s /ANSI
  5. Generic Credential:
  6. Target: ta
  7. Persist: Session
  8. D:\WINNT.2\system32>crtest /r:ta /ty:g /ANSI
  9. Generic Credential:
  10. Target: ta
  11. Persist: Session
  12. LastWritten: 3/31/2001 14:03:24
  13. D:\WINNT.2\system32>rem test attributes on creds
  14. D:\WINNT.2\system32>crtest /w:t1 /ty:p /pe:s /com:"my comment" /password:MyPasswordIsReallyLong /user:[email protected] /at:f,g=1 /ANSI
  15. Password Credential:
  16. Target: t1
  17. Comment: my comment
  18. Persist: Session
  19. UserName: [email protected]
  20. Password:
  21. ------------------------------------
  22. 4d 00 79 00 50 00 61 00 73 00 73 00 77 00 6f 00 M.y.P.a.s.s.w.o.
  23. 72 00 64 00 49 00 73 00 52 00 65 00 61 00 6c 00 r.d.I.s.R.e.a.l.
  24. 6c 00 79 00 4c 00 6f 00 6e 00 67 00 l.y.L.o.n.g.
  25. ------------------------------------
  26. Attributes:
  27. f=
  28. g= 31 1
  29. D:\WINNT.2\system32>crtest /r:t1 /ty:p /ANSI
  30. Password Credential:
  31. Target: t1
  32. Comment: my comment
  33. Persist: Session
  34. UserName: [email protected]
  35. LastWritten: 3/31/2001 14:03:25
  36. Attributes:
  37. f=
  38. g= 31 1
  39. D:\WINNT.2\system32>rem ensure I can write over a cred
  40. D:\WINNT.2\system32>crtest /w:t1 /ty:p /pe:s /com:"c comment" /password:Pwd2 /user:[email protected] /ANSI
  41. Password Credential:
  42. Target: t1
  43. Comment: c comment
  44. Persist: Session
  45. UserName: [email protected]
  46. Password: 00770050 00320064 P.w.d.2.
  47. D:\WINNT.2\system32>crtest /r:t1 /ty:p /ANSI
  48. Password Credential:
  49. Target: t1
  50. Comment: c comment
  51. Persist: Session
  52. UserName: [email protected]
  53. LastWritten: 3/31/2001 14:03:25
  54. D:\WINNT.2\system32>rem ensure a cred matches both the netbios and dns name
  55. D:\WINNT.2\system32>crtest /w:s1 /ty:p /pe:s /com:"c comment" /password:Pwd3 /user:[email protected] /ANSI
  56. Password Credential:
  57. Target: s1
  58. Comment: c comment
  59. Persist: Session
  60. UserName: [email protected]
  61. Password: 00770050 00330064 P.w.d.3.
  62. D:\WINNT.2\system32>crtest /r /tins:s1 /ANSI
  63. TargetInformation:
  64. NetbiosServerName: s1
  65. Password Credential:
  66. Target: s1
  67. Comment: c comment
  68. Persist: Session
  69. UserName: [email protected]
  70. LastWritten: 3/31/2001 14:03:26
  71. D:\WINNT.2\system32>crtest /r /tids:s1 /ANSI
  72. TargetInformation:
  73. DnsServerName: s1
  74. Password Credential:
  75. Target: s1
  76. Comment: c comment
  77. Persist: Session
  78. UserName: [email protected]
  79. LastWritten: 3/31/2001 14:03:26
  80. D:\WINNT.2\system32>crtest /r /tids:s1.ms.com /ANSI
  81. TargetInformation:
  82. DnsServerName: s1.ms.com
  83. Password Credential:
  84. Target: s1
  85. Comment: c comment
  86. Persist: Session
  87. UserName: [email protected]
  88. LastWritten: 3/31/2001 14:03:26
  89. D:\WINNT.2\system32>rem ... even if it has a target alias
  90. D:\WINNT.2\system32>crtest /w:s2.ms.com /targeta:s2 /ty:p /pe:s /com:"c comment" /password:Pwd4 /user:[email protected] /ANSI
  91. Password Credential:
  92. Target: s2.ms.com (s2)
  93. Comment: c comment
  94. Persist: Session
  95. UserName: [email protected]
  96. Password: 00770050 00340064 P.w.d.4.
  97. D:\WINNT.2\system32>crtest /r /tins:s2 /ANSI
  98. TargetInformation:
  99. NetbiosServerName: s2
  100. Password Credential:
  101. Target: s2.ms.com (s2)
  102. Comment: c comment
  103. Persist: Session
  104. UserName: [email protected]
  105. LastWritten: 3/31/2001 14:03:27
  106. D:\WINNT.2\system32>crtest /r /tids:s2 /ANSI
  107. TargetInformation:
  108. DnsServerName: s2
  109. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  110. D:\WINNT.2\system32>crtest /r /tids:s2.ms.com /ANSI
  111. TargetInformation:
  112. DnsServerName: s2.ms.com
  113. Password Credential:
  114. Target: s2.ms.com (s2)
  115. Comment: c comment
  116. Persist: Session
  117. UserName: [email protected]
  118. LastWritten: 3/31/2001 14:03:27
  119. D:\WINNT.2\system32>rem Try it with a dns host name as target name
  120. D:\WINNT.2\system32>crtest /w:s3.ms.com /ty:p /pe:s /com:"c comment" /password:Pwd5 /user:[email protected] /ANSI
  121. Password Credential:
  122. Target: s3.ms.com
  123. Comment: c comment
  124. Persist: Session
  125. UserName: [email protected]
  126. Password: 00770050 00350064 P.w.d.5.
  127. D:\WINNT.2\system32>crtest /r /tins:s3 /ANSI
  128. TargetInformation:
  129. NetbiosServerName: s3
  130. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  131. D:\WINNT.2\system32>crtest /r /tids:s3 /ANSI
  132. TargetInformation:
  133. DnsServerName: s3
  134. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  135. D:\WINNT.2\system32>crtest /r /tids:s3.ms.com /ANSI
  136. TargetInformation:
  137. DnsServerName: s3.ms.com
  138. Password Credential:
  139. Target: s3.ms.com
  140. Comment: c comment
  141. Persist: Session
  142. UserName: [email protected]
  143. LastWritten: 3/31/2001 14:03:28
  144. D:\WINNT.2\system32>rem Try a wildcarded server name
  145. D:\WINNT.2\system32>crtest /w:*.hp.com /ty:p /pe:s /com:"c comment" /password:Pwd6 /user:[email protected] /ANSI
  146. Password Credential:
  147. Target: *.hp.com
  148. Comment: c comment
  149. Persist: Session
  150. UserName: [email protected]
  151. Password: 00770050 00360064 P.w.d.6.
  152. D:\WINNT.2\system32>crtest /r /tins:hp /ANSI
  153. TargetInformation:
  154. NetbiosServerName: hp
  155. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  156. D:\WINNT.2\system32>crtest /r /tins:hp.com /ANSI
  157. TargetInformation:
  158. NetbiosServerName: hp.com
  159. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  160. D:\WINNT.2\system32>crtest /r /tids:hp.com /ANSI
  161. TargetInformation:
  162. DnsServerName: hp.com
  163. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  164. D:\WINNT.2\system32>crtest /r /tids:fred.hp.com /ANSI
  165. TargetInformation:
  166. DnsServerName: fred.hp.com
  167. Password Credential:
  168. Target: *.hp.com
  169. Comment: c comment
  170. Persist: Session
  171. UserName: [email protected]
  172. LastWritten: 3/31/2001 14:03:29
  173. D:\WINNT.2\system32>crtest /r /tids:p.com /ANSI
  174. TargetInformation:
  175. DnsServerName: p.com
  176. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  177. D:\WINNT.2\system32>crtest /r /tids:fred.hp.com. /ANSI
  178. TargetInformation:
  179. DnsServerName: fred.hp.com.
  180. Password Credential:
  181. Target: *.hp.com
  182. Comment: c comment
  183. Persist: Session
  184. UserName: [email protected]
  185. LastWritten: 3/31/2001 14:03:29
  186. D:\WINNT.2\system32>rem Another random test
  187. D:\WINNT.2\system32>crtest /w:cliffvdom.nttest.microsoft.com /ti:cliffv2 /ty:p /pe:s /ANSI
  188. Password Credential:
  189. Target: cliffvdom.nttest.microsoft.com
  190. Persist: Session
  191. Could not get target info: Status = 1168 0x490 ERROR_NOT_FOUND
  192. D:\WINNT.2\system32>crtest /r /ti:cliffv /ANSI
  193. Could not get target info: Status = 1168 0x490 ERROR_NOT_FOUND
  194. D:\WINNT.2\system32>rem Two dots at end of UPN are bogus
  195. D:\WINNT.2\system32>crtest /w:*.hp.com /ty:p /pe:s /com:"c comment" /password:Pwd1 /user:[email protected].. /ANSI
  196. Password Credential:
  197. Target: *.hp.com
  198. Comment: c comment
  199. Persist: Session
  200. UserName: [email protected]..
  201. Password: 00770050 00310064 P.w.d.1.
  202. Could not write credential: Status = 2202 0x89a ERROR_BAD_USERNAME
  203. D:\WINNT.2\system32>rem This one should make up a tagert alias of "bob" (in an older design)
  204. D:\WINNT.2\system32>crtest /w:bob.hp.com /ty:p /pe:s /com:"c comment" /password:Pwd8 /user:[email protected] /tids:bob.hp.com /ANSI
  205. Password Credential:
  206. Target: bob.hp.com
  207. Comment: c comment
  208. Persist: Session
  209. UserName: [email protected]
  210. Password: 00770050 00380064 P.w.d.8.
  211. TargetInformation:
  212. DnsServerName: bob.hp.com
  213. D:\WINNT.2\system32>crtest /r:bob.hp.com /ty:p /ANSI
  214. Password Credential:
  215. Target: bob.hp.com
  216. Comment: c comment
  217. Persist: Session
  218. UserName: [email protected]
  219. LastWritten: 3/31/2001 14:03:31
  220. D:\WINNT.2\system32>rem Create a credential with a netbios server name
  221. D:\WINNT.2\system32>crtest /w:zoe /ty:p /pe:s /com:"c comment" /password:Pwd9 /user:[email protected] /tins:zoe /ANSI
  222. Password Credential:
  223. Target: zoe
  224. Comment: c comment
  225. Persist: Session
  226. UserName: [email protected]
  227. Password: 00770050 00390064 P.w.d.9.
  228. TargetInformation:
  229. NetbiosServerName: zoe
  230. D:\WINNT.2\system32>crtest /e:zoe* /ANSI
  231. Password Credential:
  232. Target: zoe
  233. Comment: c comment
  234. Persist: Session
  235. UserName: [email protected]
  236. LastWritten: 3/31/2001 14:03:31
  237. D:\WINNT.2\system32>rem prune it
  238. D:\WINNT.2\system32>crtest /w:zoe.hp.com /ty:p /pe:s /com:"c comment" /password:Pwd10 /user:[email protected] /tins:zoe /tids:zoe.hp.com /ANSI
  239. Password Credential:
  240. Target: zoe.hp.com
  241. Comment: c comment
  242. Persist: Session
  243. UserName: [email protected]
  244. Password: 50 00 77 00 64 00 31 00 30 00 P.w.d.1.0.
  245. TargetInformation:
  246. NetbiosServerName: zoe
  247. DnsServerName: zoe.hp.com
  248. D:\WINNT.2\system32>crtest /e:zoe* /ANSI
  249. Password Credential:
  250. Target: zoe.hp.com
  251. Comment: c comment
  252. Persist: Session
  253. UserName: [email protected]
  254. LastWritten: 3/31/2001 14:03:32
  255. Password Credential:
  256. Target: zoe
  257. Comment: c comment
  258. Persist: Session
  259. UserName: [email protected]
  260. LastWritten: 3/31/2001 14:03:31
  261. D:\WINNT.2\system32>rem Create a credential with a netbios domain name
  262. D:\WINNT.2\system32>crtest /w:zat /ty:p /pe:s /password:Pwd11 /user:[email protected] /tins:zat5 /tind:zat /ANSI
  263. Password Credential:
  264. Target: zat
  265. Persist: Session
  266. UserName: [email protected]
  267. Password: 50 00 77 00 64 00 31 00 31 00 P.w.d.1.1.
  268. TargetInformation:
  269. NetbiosServerName: zat5
  270. NetbiosDomainName: zat
  271. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  272. D:\WINNT.2\system32>rem Create a corresponding password credential
  273. D:\WINNT.2\system32>crtest /w:zat /ty:p /pe:s /password:Pwd12 /user:[email protected] /tins:zat5 /tind:zat /ANSI
  274. Password Credential:
  275. Target: zat
  276. Persist: Session
  277. UserName: [email protected]
  278. Password: 50 00 77 00 64 00 31 00 32 00 P.w.d.1.2.
  279. TargetInformation:
  280. NetbiosServerName: zat5
  281. NetbiosDomainName: zat
  282. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  283. D:\WINNT.2\system32>crtest /e:zat* /ANSI
  284. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  285. D:\WINNT.2\system32>rem Get the domain credentials
  286. D:\WINNT.2\system32>crtest /r:zat /tins:zat5 /tind:zat /tidd:zat.ms.com /ANSI
  287. TargetInformation:
  288. NetbiosServerName: zat5
  289. NetbiosDomainName: zat
  290. DnsDomainName: zat.ms.com
  291. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  292. D:\WINNT.2\system32>crtest /e:zat* /ANSI
  293. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  294. D:\WINNT.2\system32>rem Create the Dns counterparts
  295. D:\WINNT.2\system32>crtest /w:zat.ms.com /ty:c /pe:s /password:Cert13 /user:@@BCIgACIgACIgACIgACIgACIgACIA /tins:zat5 /tidd:zat.ms.com /ANSI
  296. Certificate Credential:
  297. Target: zat.ms.com
  298. Persist: Session
  299. UserName: @@BCIgACIgACIgACIgACIgACIgACIA
  300. Password: 00650043 00740072 00330031 C.e.r.t.1.3.
  301. TargetInformation:
  302. NetbiosServerName: zat5
  303. DnsDomainName: zat.ms.com
  304. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  305. D:\WINNT.2\system32>crtest /w:zat.ms.com /ty:p /pe:s /password:Pwd14 /user:[email protected]. /tins:zat5 /tidd:zat.ms.com /ANSI
  306. Password Credential:
  307. Target: zat.ms.com
  308. Persist: Session
  309. UserName: [email protected].
  310. Password: 50 00 77 00 64 00 31 00 34 00 P.w.d.1.4.
  311. TargetInformation:
  312. NetbiosServerName: zat5
  313. DnsDomainName: zat.ms.com
  314. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  315. D:\WINNT.2\system32>crtest /e:zat* /ANSI
  316. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  317. D:\WINNT.2\system32>rem Now prune them
  318. D:\WINNT.2\system32>crtest /r:zat /tins:zat5 /tind:zat /tidd:zat.ms.com /ANSI
  319. TargetInformation:
  320. NetbiosServerName: zat5
  321. NetbiosDomainName: zat
  322. DnsDomainName: zat.ms.com
  323. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  324. D:\WINNT.2\system32>crtest /e:zat* /ANSI
  325. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  326. D:\WINNT.2\system32>rem If I have a cred with TN=dns and TA=Netbios ...
  327. D:\WINNT.2\system32>crtest /w:yat.ms.com /ty:p /pe:s /password:Pwd15 /user:[email protected]. /tins:yat /tids:yat.ms.com /targetalias:yat /ANSI
  328. Password Credential:
  329. Target: yat.ms.com (yat)
  330. Persist: Session
  331. UserName: [email protected].
  332. Password: 50 00 77 00 64 00 31 00 35 00 P.w.d.1.5.
  333. TargetInformation:
  334. NetbiosServerName: yat
  335. DnsServerName: yat.ms.com
  336. D:\WINNT.2\system32>rem ... then write an entry with TN=netbios, prune should fail
  337. D:\WINNT.2\system32>crtest /w:yat /ty:p /pe:s /password:Pwd16 /user:[email protected]. /tins:yat /ANSI
  338. Password Credential:
  339. Target: yat
  340. Persist: Session
  341. UserName: [email protected].
  342. Password: 50 00 77 00 64 00 31 00 36 00 P.w.d.1.6.
  343. TargetInformation:
  344. NetbiosServerName: yat
  345. D:\WINNT.2\system32>rem If I have a server cred ...
  346. D:\WINNT.2\system32>crtest /w:wat.ms.com /ty:p /pe:s /password:Pwd17 /user:[email protected]. /tins:wat /tids:wat.ms.com /targetalias:wat /ANSI
  347. Password Credential:
  348. Target: wat.ms.com (wat)
  349. Persist: Session
  350. UserName: [email protected].
  351. Password: 50 00 77 00 64 00 31 00 37 00 P.w.d.1.7.
  352. TargetInformation:
  353. NetbiosServerName: wat
  354. DnsServerName: wat.ms.com
  355. D:\WINNT.2\system32>crtest /e:wat*
  356. Password Credential:
  357. Target: wat.ms.com (wat)
  358. Persist: Session
  359. UserName: [email protected]
  360. LastWritten: 3/31/2001 14:03:35
  361. D:\WINNT.2\system32>rem ... and a domain cred ...
  362. D:\WINNT.2\system32>crtest /w:vat.ms.com /ty:p /pe:s /password:Pwd18 /user:[email protected]. /tind:vat /tidd:vat.ms.com /targetalias:vat /ANSI
  363. Password Credential:
  364. Target: vat.ms.com (vat)
  365. Persist: Session
  366. UserName: [email protected].
  367. Password: 50 00 77 00 64 00 31 00 38 00 P.w.d.1.8.
  368. TargetInformation:
  369. NetbiosDomainName: vat
  370. DnsDomainName: vat.ms.com
  371. D:\WINNT.2\system32>crtest /e:vat*
  372. Password Credential:
  373. Target: vat.ms.com (vat)
  374. Persist: Session
  375. UserName: [email protected]
  376. LastWritten: 3/31/2001 14:03:36
  377. D:\WINNT.2\system32>rem ... prune the server cred as soon as we find out the relationship
  378. D:\WINNT.2\system32>crtest /r /tins:wat /tind:vat /ANSI
  379. TargetInformation:
  380. NetbiosServerName: wat
  381. NetbiosDomainName: vat
  382. Password Credential:
  383. Target: wat.ms.com (wat)
  384. Persist: Session
  385. UserName: [email protected]
  386. LastWritten: 3/31/2001 14:03:35
  387. D:\WINNT.2\system32>crtest /e:wat*
  388. Password Credential:
  389. Target: wat.ms.com (wat)
  390. Persist: Session
  391. UserName: [email protected]
  392. LastWritten: 3/31/2001 14:03:35
  393. D:\WINNT.2\system32>crtest /e:vat*
  394. Password Credential:
  395. Target: vat.ms.com (vat)
  396. Persist: Session
  397. UserName: [email protected]
  398. LastWritten: 3/31/2001 14:03:36
  399. D:\WINNT.2\system32>rem If I have a domain cred ...
  400. D:\WINNT.2\system32>crtest /w:qat.ms.com /ty:p /pe:s /password:Pwd19 /user:[email protected]. /tind:qat /tidd:qat.ms.com /targetalias:qat /ANSI
  401. Password Credential:
  402. Target: qat.ms.com (qat)
  403. Persist: Session
  404. UserName: [email protected].
  405. Password: 50 00 77 00 64 00 31 00 39 00 P.w.d.1.9.
  406. TargetInformation:
  407. NetbiosDomainName: qat
  408. DnsDomainName: qat.ms.com
  409. D:\WINNT.2\system32>crtest /e:qat* /ANSI
  410. Password Credential:
  411. Target: qat.ms.com (qat)
  412. Persist: Session
  413. UserName: [email protected]
  414. LastWritten: 3/31/2001 14:03:37
  415. D:\WINNT.2\system32>rem ... morph it to a forest cred as soon as we find out the name
  416. D:\WINNT.2\system32>crtest /r /tins:wat /tind:qat /tidt:rat.ms.com /ANSI
  417. TargetInformation:
  418. NetbiosServerName: wat
  419. NetbiosDomainName: qat
  420. DnsTreeName: rat.ms.com
  421. Password Credential:
  422. Target: wat.ms.com (wat)
  423. Persist: Session
  424. UserName: [email protected]
  425. LastWritten: 3/31/2001 14:03:35
  426. D:\WINNT.2\system32>crtest /e:qat* /ANSI
  427. Password Credential:
  428. Target: qat.ms.com (qat)
  429. Persist: Session
  430. UserName: [email protected]
  431. LastWritten: 3/31/2001 14:03:37
  432. D:\WINNT.2\system32>crtest /e:rat* /ANSI
  433. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  434. D:\WINNT.2\system32>rem If I have a domain cred ...
  435. D:\WINNT.2\system32>crtest /w:tat.ms.com /ty:p /pe:s /password:Pwd20 /user:[email protected]. /tind:tat /tidd:tat.ms.com /targetalias:tat /ANSI
  436. Password Credential:
  437. Target: tat.ms.com (tat)
  438. Persist: Session
  439. UserName: [email protected].
  440. Password: 50 00 77 00 64 00 32 00 30 00 P.w.d.2.0.
  441. TargetInformation:
  442. NetbiosDomainName: tat
  443. DnsDomainName: tat.ms.com
  444. D:\WINNT.2\system32>crtest /e:tat* /ANSI
  445. Password Credential:
  446. Target: tat.ms.com (tat)
  447. Persist: Session
  448. UserName: [email protected]
  449. LastWritten: 3/31/2001 14:03:38
  450. D:\WINNT.2\system32>rem ... and a forest cred ...
  451. D:\WINNT.2\system32>crtest /w:sat.ms.com /ty:p /pe:s /password:Pwd21 /user:[email protected]. /tidt:sat.ms.com /ANSI
  452. Password Credential:
  453. Target: sat.ms.com
  454. Persist: Session
  455. UserName: [email protected].
  456. Password: 50 00 77 00 64 00 32 00 31 00 P.w.d.2.1.
  457. TargetInformation:
  458. DnsTreeName: sat.ms.com
  459. D:\WINNT.2\system32>crtest /e:sat* /ANSI
  460. Password Credential:
  461. Target: sat.ms.com
  462. Persist: Session
  463. UserName: [email protected]
  464. LastWritten: 3/31/2001 14:03:39
  465. D:\WINNT.2\system32>rem ... prune the domain cred as soon as we find out the relationship
  466. D:\WINNT.2\system32>crtest /r /tins:wat /tind:tat /tidt:sat.ms.com /ANSI
  467. TargetInformation:
  468. NetbiosServerName: wat
  469. NetbiosDomainName: tat
  470. DnsTreeName: sat.ms.com
  471. Password Credential:
  472. Target: wat.ms.com (wat)
  473. Persist: Session
  474. UserName: [email protected]
  475. LastWritten: 3/31/2001 14:03:35
  476. D:\WINNT.2\system32>crtest /e:tat* /ANSI
  477. Password Credential:
  478. Target: tat.ms.com (tat)
  479. Persist: Session
  480. UserName: [email protected]
  481. LastWritten: 3/31/2001 14:03:38
  482. D:\WINNT.2\system32>crtest /e:sat* /ANSI
  483. Password Credential:
  484. Target: sat.ms.com
  485. Persist: Session
  486. UserName: [email protected]
  487. LastWritten: 3/31/2001 14:03:39
  488. D:\WINNT.2\system32>rem If I have a domain cred ...
  489. D:\WINNT.2\system32>crtest /w:qat.ms.com /ty:p /pe:s /password:Pwd22 /user:[email protected]. /tind:qat /tidd:qat.ms.com /targetalias:qat /ANSI
  490. Password Credential:
  491. Target: qat.ms.com (qat)
  492. Persist: Session
  493. UserName: [email protected].
  494. Password: 50 00 77 00 64 00 32 00 32 00 P.w.d.2.2.
  495. TargetInformation:
  496. NetbiosDomainName: qat
  497. DnsDomainName: qat.ms.com
  498. D:\WINNT.2\system32>crtest /e:qat* /ANSI
  499. Password Credential:
  500. Target: qat.ms.com (qat)
  501. Persist: Session
  502. UserName: [email protected]
  503. LastWritten: 3/31/2001 14:03:40
  504. D:\WINNT.2\system32>rem ... morph it to a forest cred as soon as we find out the name
  505. D:\WINNT.2\system32>crtest /r /tins:wat /tind:qat /tidt:rat.ms.com /ANSI
  506. TargetInformation:
  507. NetbiosServerName: wat
  508. NetbiosDomainName: qat
  509. DnsTreeName: rat.ms.com
  510. Password Credential:
  511. Target: wat.ms.com (wat)
  512. Persist: Session
  513. UserName: [email protected]
  514. LastWritten: 3/31/2001 14:03:35
  515. D:\WINNT.2\system32>crtest /e:qat* /ANSI
  516. Password Credential:
  517. Target: qat.ms.com (qat)
  518. Persist: Session
  519. UserName: [email protected]
  520. LastWritten: 3/31/2001 14:03:40
  521. D:\WINNT.2\system32>crtest /e:rat* /ANSI
  522. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  523. D:\WINNT.2\system32>rem If I have another domain cred ...
  524. D:\WINNT.2\system32>crtest /w:pat.ms.com /ty:p /pe:s /password:Pwd23 /user:[email protected]. /tind:pat /tidd:pat.ms.com /targetalias:pat /ANSI
  525. Password Credential:
  526. Target: pat.ms.com (pat)
  527. Persist: Session
  528. UserName: [email protected].
  529. Password: 50 00 77 00 64 00 32 00 33 00 P.w.d.2.3.
  530. TargetInformation:
  531. NetbiosDomainName: pat
  532. DnsDomainName: pat.ms.com
  533. D:\WINNT.2\system32>rem ... morph it into the same forest
  534. D:\WINNT.2\system32>crtest /r /tins:wat /tind:pat /tidt:rat.ms.com /ANSI
  535. TargetInformation:
  536. NetbiosServerName: wat
  537. NetbiosDomainName: pat
  538. DnsTreeName: rat.ms.com
  539. Password Credential:
  540. Target: wat.ms.com (wat)
  541. Persist: Session
  542. UserName: [email protected]
  543. LastWritten: 3/31/2001 14:03:35
  544. D:\WINNT.2\system32>crtest /e:pat* /ANSI
  545. Password Credential:
  546. Target: pat.ms.com (pat)
  547. Persist: Session
  548. UserName: [email protected]
  549. LastWritten: 3/31/2001 14:03:41
  550. D:\WINNT.2\system32>crtest /e:rat* /ANSI
  551. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  552. D:\WINNT.2\system32>rem Add yet another domain alias ...
  553. D:\WINNT.2\system32>crtest /w:nat.ms.com /ty:p /pe:s /password:Pwd24 /user:[email protected]. /tind:nat /tidd:nat.ms.com /targetalias:nat /ANSI
  554. Password Credential:
  555. Target: nat.ms.com (nat)
  556. Persist: Session
  557. UserName: [email protected].
  558. Password: 50 00 77 00 64 00 32 00 34 00 P.w.d.2.4.
  559. TargetInformation:
  560. NetbiosDomainName: nat
  561. DnsDomainName: nat.ms.com
  562. D:\WINNT.2\system32>rem ... morph it into the same forest
  563. D:\WINNT.2\system32>crtest /r /tins:wat /tind:nat /tidt:rat.ms.com /ANSI
  564. TargetInformation:
  565. NetbiosServerName: wat
  566. NetbiosDomainName: nat
  567. DnsTreeName: rat.ms.com
  568. Password Credential:
  569. Target: wat.ms.com (wat)
  570. Persist: Session
  571. UserName: [email protected]
  572. LastWritten: 3/31/2001 14:03:35
  573. D:\WINNT.2\system32>crtest /e:nat* /ANSI
  574. Password Credential:
  575. Target: nat.ms.com (nat)
  576. Persist: Session
  577. UserName: [email protected]
  578. LastWritten: 3/31/2001 14:03:42
  579. D:\WINNT.2\system32>crtest /e:rat* /ANSI
  580. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  581. D:\WINNT.2\system32>rem Move "pat" to a new forest
  582. D:\WINNT.2\system32>crtest /r /tins:wat /tind:pat /tidd:pat.ms.com /tidt:mat.ms.com /ANSI
  583. TargetInformation:
  584. NetbiosServerName: wat
  585. NetbiosDomainName: pat
  586. DnsDomainName: pat.ms.com
  587. DnsTreeName: mat.ms.com
  588. Password Credential:
  589. Target: wat.ms.com (wat)
  590. Persist: Session
  591. UserName: [email protected]
  592. LastWritten: 3/31/2001 14:03:35
  593. D:\WINNT.2\system32>crtest /e:rat* /ANSI
  594. Could not enumerate credentials: Status = 1168 0x490 ERROR_NOT_FOUND
  595. D:\WINNT.2\system32>rem Note that password creds allow marshaled user names
  596. D:\WINNT.2\system32>crtest /w:lat /ty:p /pe:s /password:Pwd25 /user:@@BCIgACIgACIgACIgACIgACIgACIA /ANSI
  597. Password Credential:
  598. Target: lat
  599. Persist: Session
  600. UserName: @@BCIgACIgACIgACIgACIgACIgACIA
  601. Password: 50 00 77 00 64 00 32 00 35 00 P.w.d.2.5.
  602. D:\WINNT.2\system32>rem ensure cert creds don't allow normal user names
  603. D:\WINNT.2\system32>crtest /w:lat /ty:c /pe:s /password:Pwd26 /user:[email protected]. /ANSI
  604. Certificate Credential:
  605. Target: lat
  606. Persist: Session
  607. UserName: [email protected].
  608. Password: 50 00 77 00 64 00 32 00 36 00 P.w.d.2.6.
  609. Could not write credential: Status = 2202 0x89a ERROR_BAD_USERNAME
  610. D:\WINNT.2\system32>rem ensure we can get the session type
  611. D:\WINNT.2\system32>crtest /gst
  612. 'Enterprise' persistence is supported for 'Generic' creds.
  613. 'Enterprise' persistence is supported for 'Password' creds.
  614. 'Enterprise' persistence is supported for 'Certificate' creds.
  615. 'Enterprise' persistence is supported for 'VisiblePassword' creds.
  616. D:\WINNT.2\system32>rem Ensure runas target name matches user name (all canonical combinations)
  617. D:\WINNT.2\system32>crtest /w:Nowislat /ty:p /pe:s /password:Pwd27 /user:[email protected]. /ANSI /credUsernameTarget
  618. Password Credential:
  619. Flags: UsernameTarget
  620. Target: Nowislat
  621. Persist: Session
  622. UserName: [email protected].
  623. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  624. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  625. D:\WINNT.2\system32>crtest /w:[email protected] /ty:p /pe:s /password:Pwd27 /user:[email protected] /ANSI /credUsernameTarget
  626. Password Credential:
  627. Flags: UsernameTarget
  628. Target: [email protected]
  629. Persist: Session
  630. UserName: [email protected]
  631. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  632. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  633. D:\WINNT.2\system32>crtest /w:[email protected] /ty:p /pe:s /password:Pwd27 /user:[email protected] /ANSI /credUsernameTarget
  634. Password Credential:
  635. Flags: UsernameTarget
  636. Target: [email protected]
  637. Persist: Session
  638. UserName: [email protected]
  639. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  640. D:\WINNT.2\system32>crtest /w:[email protected] /ty:p /pe:s /password:Pwd27 /user:[email protected]. /ANSI /credUsernameTarget
  641. Password Credential:
  642. Flags: UsernameTarget
  643. Target: [email protected]
  644. Persist: Session
  645. UserName: [email protected].
  646. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  647. D:\WINNT.2\system32>crtest /w:[email protected]. /ty:p /pe:s /password:Pwd27 /user:[email protected] /ANSI /credUsernameTarget
  648. Password Credential:
  649. Flags: UsernameTarget
  650. Target: [email protected].
  651. Persist: Session
  652. UserName: [email protected]
  653. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  654. D:\WINNT.2\system32>crtest /w:[email protected]. /ty:p /pe:s /password:Pwd27 /user:[email protected]. /ANSI /credUsernameTarget
  655. Password Credential:
  656. Flags: UsernameTarget
  657. Target: [email protected].
  658. Persist: Session
  659. UserName: [email protected].
  660. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  661. D:\WINNT.2\system32>crtest /r:[email protected] /ty:p /ANSI
  662. Password Credential:
  663. Flags: UsernameTarget
  664. Target: [email protected]
  665. Persist: Session
  666. UserName: [email protected]
  667. LastWritten: 3/31/2001 14:03:45
  668. D:\WINNT.2\system32>rem Ensure we support canonicalization <domain>/user
  669. D:\WINNT.2\system32>crtest /w:cat /ty:p /pe:s /password:Pwd27 /user:ms.com.\u26 /ANSI
  670. Password Credential:
  671. Target: cat
  672. Persist: Session
  673. UserName: ms.com.\u26
  674. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  675. D:\WINNT.2\system32>crtest /r:cat /ty:p /ANSI
  676. Password Credential:
  677. Target: cat
  678. Persist: Session
  679. UserName: ms.com\u26
  680. LastWritten: 3/31/2001 14:03:46
  681. D:\WINNT.2\system32>rem Ensure runas support domain\user format
  682. D:\WINNT.2\system32>crtest /w:ms.com\u27 /ty:p /pe:s /password:Pwd27 /user:ms.com\u27 /ANSI /credUsernameTarget
  683. Password Credential:
  684. Flags: UsernameTarget
  685. Target: ms.com\u27
  686. Persist: Session
  687. UserName: ms.com\u27
  688. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  689. D:\WINNT.2\system32>crtest /w:ms.com\u27 /ty:p /pe:s /password:Pwd27 /user:ms.com.\u27 /ANSI /credUsernameTarget
  690. Password Credential:
  691. Flags: UsernameTarget
  692. Target: ms.com\u27
  693. Persist: Session
  694. UserName: ms.com.\u27
  695. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  696. D:\WINNT.2\system32>crtest /w:ms.com.\u27 /ty:p /pe:s /password:Pwd27 /user:ms.com\u27 /ANSI /credUsernameTarget
  697. Password Credential:
  698. Flags: UsernameTarget
  699. Target: ms.com.\u27
  700. Persist: Session
  701. UserName: ms.com\u27
  702. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  703. D:\WINNT.2\system32>crtest /w:ms.com.\u27 /ty:p /pe:s /password:Pwd27 /user:ms.com.\u27 /ANSI /credUsernameTarget
  704. Password Credential:
  705. Flags: UsernameTarget
  706. Target: ms.com.\u27
  707. Persist: Session
  708. UserName: ms.com.\u27
  709. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  710. D:\WINNT.2\system32>crtest /r:ms.com\u27 /ty:p /ANSI
  711. Password Credential:
  712. Flags: UsernameTarget
  713. Target: ms.com\u27
  714. Persist: Session
  715. UserName: ms.com\u27
  716. LastWritten: 3/31/2001 14:03:47
  717. D:\WINNT.2\system32>rem Ensure /Delete supports canonicalization
  718. D:\WINNT.2\system32>crtest /w:cat.ms.com /ty:p /pe:s /password:Pwd27 /user:ms.com.\u28 /ANSI
  719. Password Credential:
  720. Target: cat.ms.com
  721. Persist: Session
  722. UserName: ms.com.\u28
  723. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  724. D:\WINNT.2\system32>crtest /de:cat.ms.com. /ty:p /ANSI
  725. D:\WINNT.2\system32>crtest /w:ms.com\u29 /ty:p /pe:s /password:Pwd27 /user:ms.com.\u29 /ANSI /credUsernameTarget
  726. Password Credential:
  727. Flags: UsernameTarget
  728. Target: ms.com\u29
  729. Persist: Session
  730. UserName: ms.com.\u29
  731. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  732. D:\WINNT.2\system32>crtest /de:ms.com.\u29 /ty:p /ANSI
  733. D:\WINNT.2\system32>rem Create the special credentials
  734. D:\WINNT.2\system32>crtest /w:* /ty:p /pe:s /password:Pwd27 /user:ms.com.\u30 /ANSI
  735. Password Credential:
  736. Target: *
  737. Persist: Session
  738. UserName: ms.com.\u30
  739. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  740. D:\WINNT.2\system32>crtest /w:*Session /ty:p /pe:s /password:Pwd27 /user:ms.com.\u30 /ANSI
  741. Password Credential:
  742. Target: *Session
  743. Persist: Session
  744. UserName: ms.com.\u30
  745. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  746. D:\WINNT.2\system32>rem Try renaming 'from' the special credentials
  747. D:\WINNT.2\system32>crtest /old:* /new:bat.ms.com /ty:p
  748. D:\WINNT.2\system32>crtest /r:bat.ms.com /ty:p
  749. Password Credential:
  750. Target: bat.ms.com
  751. Persist: Session
  752. UserName: ms.com\u30
  753. LastWritten: 3/31/2001 14:03:49
  754. D:\WINNT.2\system32>crtest /r:* /ty:p
  755. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  756. D:\WINNT.2\system32>crtest /old:*Session /new:aat.ms.com /ty:p
  757. D:\WINNT.2\system32>crtest /r:aat.ms.com /ty:p
  758. Password Credential:
  759. Target: aat.ms.com
  760. Persist: Session
  761. UserName: ms.com\u30
  762. LastWritten: 3/31/2001 14:03:50
  763. D:\WINNT.2\system32>crtest /r:*Session /ty:p
  764. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  765. D:\WINNT.2\system32>rem Try renaming 'to' the special credentials
  766. D:\WINNT.2\system32>crtest /old:bat.ms.com /new:* /ty:p
  767. D:\WINNT.2\system32>crtest /r:bat.ms.com /ty:p
  768. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  769. D:\WINNT.2\system32>crtest /r:* /ty:p
  770. Password Credential:
  771. Target: *
  772. Persist: Session
  773. UserName: ms.com\u30
  774. LastWritten: 3/31/2001 14:03:51
  775. D:\WINNT.2\system32>crtest /old:aat.ms.com /new:*session /ty:p
  776. D:\WINNT.2\system32>crtest /r:aat.ms.com /ty:p
  777. Could not read credential: Status = 1168 0x490 ERROR_NOT_FOUND
  778. D:\WINNT.2\system32>crtest /r:*Session /ty:p
  779. Password Credential:
  780. Target: *session
  781. Persist: Session
  782. UserName: ms.com\u30
  783. LastWritten: 3/31/2001 14:03:51
  784. D:\WINNT.2\system32>rem Create the session cred with the wrong persistance
  785. D:\WINNT.2\system32>crtest /w:*Session /ty:p /pe:l /password:Pwd27 /user:ms.com.\u30 /ANSI
  786. Password Credential:
  787. Target: *Session
  788. Persist: Local
  789. UserName: ms.com.\u30
  790. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  791. Could not write credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  792. D:\WINNT.2\system32>rem Rename to the session cred with the wrong persistance
  793. D:\WINNT.2\system32>crtest /w:dat.ms.com /ty:p /pe:l /password:Pwd27 /user:ms.com.\u31 /ANSI
  794. Password Credential:
  795. Target: dat.ms.com
  796. Persist: Local
  797. UserName: ms.com.\u31
  798. Password: 50 00 77 00 64 00 32 00 37 00 P.w.d.2.7.
  799. D:\WINNT.2\system32>crtest /old:dat.ms.com /new:*session /ty:p
  800. Could not rename credential: Status = 87 0x57 ERROR_INVALID_PARAMETER
  801. D:\WINNT.2\system32>rem test the DFS syntax
  802. D:\WINNT.2\system32>crtest /w:dfsroot\dfsshare /ty:p /pe:s /password:Pwd31 /user:ms.com.\u31 /ANSI
  803. Password Credential:
  804. Target: dfsroot\dfsshare
  805. Persist: Session
  806. UserName: ms.com.\u31
  807. Password: 50 00 77 00 64 00 33 00 31 00 P.w.d.3.1.
  808. D:\WINNT.2\system32>crtest /r /titn:dfsroot\dfsshare
  809. TargetInformation:
  810. TargetName: dfsroot\dfsshare
  811. Password Credential:
  812. Target: dfsroot\dfsshare
  813. Persist: Session
  814. UserName: ms.com\u31
  815. LastWritten: 3/31/2001 14:03:53
  816. D:\WINNT.2\system32>rem test a non-existent cert
  817. D:\WINNT.2\system32>crtest /w:t28 /ty:c /pe:s /com:"t28 comment" /password:Cert28 /user:@@BCIgACIgACIgACIgACIgACIgACIA /ANSI
  818. Certificate Credential:
  819. Target: t28
  820. Comment: t28 comment
  821. Persist: Session
  822. UserName: @@BCIgACIgACIgACIgACIgACIgACIA
  823. Password: 00650043 00740072 00380032 C.e.r.t.2.8.
  824. Could not write credential: Status = 2148532268 0x8010002c SCARD_E_NO_SUCH_CERTIFICATE