vlmcsd.8.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965
  1. <!-- Creator : groff version 1.22.3 -->
  2. <!-- CreationDate: Fri Sep 16 00:23:34 2016 -->
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  4. "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta name="generator" content="groff -Thtml, see www.gnu.org">
  8. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  9. <meta name="Content-Style" content="text/css">
  10. <style type="text/css">
  11. p { margin-top: 0; margin-bottom: 0; vertical-align: top }
  12. pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
  13. table { margin-top: 0; margin-bottom: 0; vertical-align: top }
  14. h1 { text-align: center }
  15. </style>
  16. <title>VLMCSD</title>
  17. </head>
  18. <body>
  19. <h1 align="center">VLMCSD</h1>
  20. <a href="#NAME">NAME</a><br>
  21. <a href="#SYNOPSIS">SYNOPSIS</a><br>
  22. <a href="#DESCRIPTION">DESCRIPTION</a><br>
  23. <a href="#OPTIONS">OPTIONS</a><br>
  24. <a href="#SIGNALS">SIGNALS</a><br>
  25. <a href="#SUPPORTED OPERATING SYSTEMS">SUPPORTED OPERATING SYSTEMS</a><br>
  26. <a href="#SUPPORTED PRODUCTS">SUPPORTED PRODUCTS</a><br>
  27. <a href="#FILES">FILES</a><br>
  28. <a href="#EXAMPLES">EXAMPLES</a><br>
  29. <a href="#BUGS">BUGS</a><br>
  30. <a href="#INTENTIONAL BUGS">INTENTIONAL BUGS</a><br>
  31. <a href="#AUTHOR">AUTHOR</a><br>
  32. <a href="#CREDITS">CREDITS</a><br>
  33. <a href="#SEE ALSO">SEE ALSO</a><br>
  34. <hr>
  35. <h2>NAME
  36. <a name="NAME"></a>
  37. </h2>
  38. <p style="margin-left:11%; margin-top: 1em">vlmcsd &minus;
  39. a fully Microsoft compatible KMS server</p>
  40. <h2>SYNOPSIS
  41. <a name="SYNOPSIS"></a>
  42. </h2>
  43. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b> [
  44. <i>options</i> ]</p>
  45. <h2>DESCRIPTION
  46. <a name="DESCRIPTION"></a>
  47. </h2>
  48. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
  49. is a fully Microsoft compatible KMS server that provides
  50. product activation services to clients. It is meant as a
  51. drop-in replacement for a Microsoft KMS server (Windows
  52. computer with KMS key entered). It currently supports KMS
  53. protocol versions 4, 5 and 6.</p>
  54. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
  55. is designed to run on POSIX compatible operating systens. It
  56. only requires a basic C library with a BSD-style sockets API
  57. and either <b>fork</b>(2) or <b>pthreads</b>(7). That allows
  58. it to run on most embedded systems like routers, NASes,
  59. mobile phones, tablets, TVs, settop boxes, etc. Some efforts
  60. have been made that it also runs on Windows.</p>
  61. <p style="margin-left:11%; margin-top: 1em">Although
  62. <b>vlmcsd</b> does neither require an activation key nor a
  63. payment to anyone, it is not meant to run illegal copies of
  64. Windows. Its purpose is to ensure that owners of legal
  65. copies can use their software without restrictions, e.g. if
  66. you buy a new computer or motherboard and your key will be
  67. refused activation from Microsoft servers due to hardware
  68. changes.</p>
  69. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
  70. may be started via an internet superserver like
  71. <b>inetd</b>(8) or <b>xinetd</b>(8) as well as an advanced
  72. init system like <b>systemd</b>(8) or <b>launchd</b>(8)
  73. using socket based activation. If <b>vlmcsd</b> detects that
  74. <b>stdin</b>(3) is a socket, it assumes that there is
  75. already a connected client on stdin that wants to be
  76. activated. All options that control setting up listening
  77. sockets will be ignored when in inetd mode.</p>
  78. <h2>OPTIONS
  79. <a name="OPTIONS"></a>
  80. </h2>
  81. <p style="margin-left:11%; margin-top: 1em">Since vlmcsd
  82. can be configured at compile time, some options may not be
  83. available on your system.</p>
  84. <p style="margin-left:11%; margin-top: 1em">All options
  85. that do no require an argument may be combined with a single
  86. dash, for instance &quot;vlmcsd -D -e&quot; is identical to
  87. &quot;vlmcsd -De&quot;. For all options that require an
  88. argument a space between the option and the option argument
  89. is optional. Thus &quot;vlmcsd -r 2&quot; and &quot;vlmcsd
  90. -r2&quot; are identical too. <b><br>
  91. -h</b> or <b>-?</b></p>
  92. <p style="margin-left:22%;">Displays help.</p>
  93. <table width="100%" border="0" rules="none" frame="void"
  94. cellspacing="0" cellpadding="0">
  95. <tr valign="top" align="left">
  96. <td width="11%"></td>
  97. <td width="3%">
  98. <p><b>-V</b></p></td>
  99. <td width="8%"></td>
  100. <td width="78%">
  101. <p>Displays extended version information. This includes the
  102. compiler used to build vlmcsd, the intended platform and
  103. flags (compile time options) to build vlmcsd. If you have
  104. the source code of vlmcsd, you can type <b>make help</b> (or
  105. <b>gmake help</b> on systems that do not use the GNU version
  106. of <b>make</b>(1) by default) to see the meaning of those
  107. flags.</p> </td></tr>
  108. </table>
  109. <p style="margin-left:11%;"><b>-L</b>
  110. <i>ipaddress</i>[:<i>port</i>]</p>
  111. <p style="margin-left:22%;">Instructs vlmcsd to listen on
  112. <i>ipaddress</i> with optional <i>port</i> (default 1688).
  113. You can use this option more than once. If you do not
  114. specify <b>-L</b> at least once, IP addresses 0.0.0.0 (IPv4)
  115. and :: (IPv6) are used. If the IP address contains colons
  116. (IPv6) you must enclose the IP address in brackets if you
  117. specify the optional port, e.g.
  118. [2001:db8::dead:beef]:1688.</p>
  119. <p style="margin-left:22%; margin-top: 1em">If no port is
  120. specified, vlmcsd uses the default port according to a
  121. preceding <b>-P</b> option. If you specify a port, it can be
  122. a number (1-65535) or a name (usually found in /etc/services
  123. if not provided via LDAP, NIS+ or another name service).</p>
  124. <p style="margin-left:22%; margin-top: 1em">If you specify
  125. a link local IPv6 address (fe80::/10, usually starting with
  126. fe80::), it must be followed by a percent sign (%) and a
  127. scope id (=network interface name or number) on most unixoid
  128. OSses including Linux, Android, MacOS X and iOS, e.g.
  129. fe80::1234:56ff:fe78:9abc<b>%eth0</b> or
  130. [fe80::1234:56ff:fe78:9abc<b>%2</b>]:1688. Windows
  131. (including cygwin) does not require a scope id unless the
  132. same link local address is used on more than one network
  133. interface. Windows does not accept a name and the scope id
  134. must be a number.</p>
  135. <p style="margin-left:11%;"><b>-o</b> <i>level</i></p>
  136. <p style="margin-left:22%;">Sets the <i>level</i> of
  137. protection against activations from public IP addresses. The
  138. default is <b>-o0</b> for no protection.</p>
  139. <p style="margin-left:22%; margin-top: 1em"><b>-o1</b>
  140. causes vlmcsd not to listen on all IP addresses but on
  141. private IP addresses only. IPv4 addresses in the
  142. 100.64.0.0/10 range (see RFC6598) are not treated as private
  143. since they can be reached from other users of your ISP.
  144. Private IPv4 addresses are 10.0.0.0/8, 172.16.0.0/12,
  145. 192.168.0.0/16, 169.254.0.0/16 and 127.0.0.0/8. vlmcsd
  146. treats all IPv6 addresses not within 2000::/3 as private
  147. addresses.</p>
  148. <p style="margin-left:22%; margin-top: 1em">If <b>-o1</b>
  149. is combined with <b>-L</b>, it will listen on all private IP
  150. addresses plus the ones specified by one or more <b>-L</b>
  151. statements. If <b>-o1</b> is combined with <b>-P</b>, only
  152. the last <b>-P</b> statement will be used.</p>
  153. <p style="margin-left:22%; margin-top: 1em">Using
  154. <b>-o1</b> does not protect you if you enable NAT port
  155. forwarding on your router to your vlmcsd machine. It is
  156. identical to using multiple -L statements with all of your
  157. private IP addresses. What <b>-o1</b> does for you, is
  158. automatically enumerating your private IP addresses.</p>
  159. <p style="margin-left:22%; margin-top: 1em"><b>-o2</b> does
  160. not affect the interfaces, vlmcsd is listening on. When a
  161. clients connects, vlmcsd immediately drops the connection if
  162. the client has a public IP address. Unlike <b>-o1</b>
  163. clients will be able to establish a TCP connection but it
  164. will be closed without a single byte sent over the
  165. connection. This protects against clients with public IP
  166. addresses even if NAT port forwarding is used. While
  167. <b>-o2</b> offers a higher level of protection than
  168. <b>-o1</b>, the client sees that the KMS TCP port (1688 by
  169. default) is actually accepting connections.</p>
  170. <p style="margin-left:22%; margin-top: 1em">If vlmcsd is
  171. compiled to use MS RPC, <b>-o2</b> can only offer very poor
  172. protection. Control is passed from MS RPC to vlmcsd after
  173. the KMS protocol has already been negotiated. Thus a client
  174. can always verify that the KMS protocol is available even
  175. though it receives an RPC_S_ACCESS_DENIED error message.
  176. vlmcsd will issue a warning if <b>-o2</b> is used with MS
  177. RPC. <b>For adaequate protection do not use a MS RPC build
  178. of vlmcsd with -o2</b>.</p>
  179. <p style="margin-left:22%; margin-top: 1em"><b>-o3</b>
  180. combines <b>-o1</b> and <b>-o2</b>. vlmcsd listens on
  181. private interfaces only and if a public client manages to
  182. connect anyway due to NAT port forwarding, it will be
  183. immediately dropped.</p>
  184. <p style="margin-left:22%; margin-top: 1em">If you use any
  185. form of TCP level port forwarding (e.g. <b>nc</b>(1),
  186. <b>netcat</b>(1), <b>ssh</b>(1) port forwarding or similar)
  187. to redirect KMS requests to vlmcsd, there will be no
  188. protection even if you use <b>-o2</b> or <b>-o3</b>. This is
  189. due to the simple fact that vlmcsd sees the IP address of
  190. the redirector and not the IP address of the client.</p>
  191. <p style="margin-left:22%; margin-top: 1em"><b>-o1</b> (and
  192. thus <b>-o3</b>) is not (yet) available in some
  193. scenarios:</p>
  194. <p style="margin-left:29%; margin-top: 1em">FreeBSD: There
  195. is a longtime unfixed
  196. <a href="https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881">bug</a>
  197. in the 32-bit ABI of the 64-bit kernel. If you have a 64-bit
  198. FreeBSD kernel, you must run the 64-bit version of vlmcsd if
  199. you use <b>-o1</b> or <b>-o3</b>. The 32-bit version causes
  200. undefined behavior up to crashing vlmcsd. Other BSDs
  201. (NetBSD, OpenBSD, Dragonfly and Mac OS X) work
  202. correctly.</p>
  203. <p style="margin-left:29%; margin-top: 1em">If vlmcsd was
  204. started by an internet superserver or was compiled to use
  205. Microsoft RPC (Windows only) or simple sockets, <b>-o1</b>
  206. and <b>-o3</b> are not available by design.</p>
  207. <p style="margin-left:11%;"><b>-P</b> <i>port</i></p>
  208. <p style="margin-left:22%;">Use TCP <i>port</i> for all
  209. subsequent <b>-L</b> statements that do not include an
  210. optional port. If you use <b>-P</b> and <b>-L</b>, <b>-P</b>
  211. must be specified before <b>-L</b>.</p>
  212. <p style="margin-left:11%;"><b>-F0</b> and <b>-F1</b></p>
  213. <p style="margin-left:22%;">Allow (<b>-F1</b>) or disallow
  214. (<b>-F0</b>) binding to IP addresses that are currently not
  215. configured on your system. The default is <b>-F0</b>.
  216. <b>-F1</b> allows you to bind to an IP address that may be
  217. configured after you started <b>vlmcsd</b>. <b>vlmcsd</b>
  218. will listen on that address as soon as it becomes available.
  219. This feature is only available under Linux (IPv4 and IPv6)
  220. and FreeBSD (IPv4 only). FreeBSD allows this feature only
  221. for the root user (more correctly: processes that have the
  222. PRIV_NETINET_BINDANY privilege). Linux does not require a
  223. capability for this.</p>
  224. <p style="margin-left:11%;"><b>-t</b> <i>seconds</i></p>
  225. <p style="margin-left:22%;">Timeout the TCP connection with
  226. the client after <i>seconds</i> seconds. After sending an
  227. activation request. RPC keeps the TCP connection for a
  228. while. The default is 30 seconds. You may specify a shorter
  229. period to free ressources on your device faster. This is
  230. useful for devices with limited main memory or if you used
  231. <b>-m</b> to limit the concurrent clients that may request
  232. activation. Microsoft RPC clients disconnect after 30
  233. seconds by default. Setting <i>seconds</i> to a greater
  234. value does not make much sense.</p>
  235. <p style="margin-left:11%;"><b>-m</b>
  236. <i>concurrent-clients</i></p>
  237. <p style="margin-left:22%;">Limit the number of clients
  238. that will be handled concurrently. This is useful for
  239. devices with limited ressources or if you are experiencing
  240. DoS attacks that spawn thousands of threads or forked
  241. processes. If additional clients connect to vlmcsd, they
  242. need to wait until another client disconnects. If you set
  243. <i>concurrent-clients</i> to a small value ( &lt;10 ), you
  244. should also select a reasonable timeout of 2 or 3 seconds
  245. with <b>-t</b>. The default is no limit.</p>
  246. <table width="100%" border="0" rules="none" frame="void"
  247. cellspacing="0" cellpadding="0">
  248. <tr valign="top" align="left">
  249. <td width="11%"></td>
  250. <td width="3%">
  251. <p><b>-d</b></p></td>
  252. <td width="8%"></td>
  253. <td width="78%">
  254. <p>Disconnect each client after processing one activation
  255. request. This is a direct violation of DCE RPC but may help
  256. if you receive malicous fake RPC requests that block your
  257. threads or forked processes. Some other KMS emulators (e.g.
  258. py-kms) behave this way.</p></td></tr>
  259. <tr valign="top" align="left">
  260. <td width="11%"></td>
  261. <td width="3%">
  262. <p><b>-k</b></p></td>
  263. <td width="8%"></td>
  264. <td width="78%">
  265. <p>Do not disconnect clients after processing an activation
  266. request. This selects the default behavior. <b>-k</b> is
  267. useful only if you used an ini file (see
  268. <b>vlmcsd.ini</b>(5) and <b>-i</b>). If the ini file
  269. contains the line &quot;DisconnectClientsImmediately =
  270. true&quot;, you can use this switch to restore the default
  271. behavior.</p> </td></tr>
  272. </table>
  273. <p style="margin-left:11%;"><b>-N0</b> and <b>-N1</b></p>
  274. <p style="margin-left:22%;">Disables (<b>-N0</b>) or
  275. enables (<b>-N1</b>) the use of the NDR64 transfer syntax in
  276. the RPC protocol. Unlike Microsoft vlmcsd supports NDR64 on
  277. 32-bit operating systems. Microsoft introduced NDR64 in
  278. Windows Vista but their KMS servers started using it with
  279. Windows 8. Thus if you choose random ePIDs, vlmcsd will
  280. select ePIDs with build numbers 9200 and 9600 if you enable
  281. NDR64 and build numbers 6002 and 7601 if you disable NDR64.
  282. The default is to enable NDR64.</p>
  283. <p style="margin-left:11%;"><b>-B0</b> and <b>-B1</b></p>
  284. <p style="margin-left:22%;">Disables (<b>-B0</b>) or
  285. enables (<b>-B1</b>) bind time feature negotiation (BTFN) in
  286. the RPC protocol. All Windows operating systems starting
  287. with Vista support BTFN and try to negotiate it when
  288. initiating an RPC connection. Thus consider turning it off
  289. as a debug / troubleshooting feature only. Some older
  290. firewalls that selectively block or redirect RPC traffic may
  291. get confused when they detect NDR64 or BTFN.</p>
  292. <p style="margin-left:11%;"><b>-l</b> <i>filename</i></p>
  293. <p style="margin-left:22%;">Use <i>filename</i> as a log
  294. file. The log file records all activations with IP address,
  295. Windows workstation name (no reverse DNS lookup), activated
  296. product, KMS protocol, time and date. If you do not specify
  297. a log file, no log is created. For a live view of the log
  298. file type tail -f <i>file</i>.</p>
  299. <p style="margin-left:22%; margin-top: 1em">If you use the
  300. special <i>filename</i> &quot;syslog&quot;, vlmcsd uses
  301. <b>syslog</b>(3) for logging. If your system has no syslog
  302. service (/dev/log) installed, logging output will go to
  303. /dev/console. Syslog logging is not available in the native
  304. Windows version. The Cygwin version does support syslog
  305. logging.</p>
  306. <p style="margin-left:11%;"><b>-T0</b> and <b>-T1</b></p>
  307. <p style="margin-left:22%;">Disable (<b>-T0</b>) or enable
  308. (<b>-T1</b>) the inclusion of date and time in each line of
  309. the log. The default is <b>-T1</b>. <b>-T0</b> is useful if
  310. you log to <b>stdout</b>(3) which is redirected to another
  311. logging mechanism that already includes date and time in its
  312. output, for instance <b>systemd-journald</b>(8). If you log
  313. to <b>syslog</b>(3), <b>-T1</b> is ignored and date and time
  314. will never be included in the output sent to
  315. <b>syslog</b>(3).</p>
  316. <table width="100%" border="0" rules="none" frame="void"
  317. cellspacing="0" cellpadding="0">
  318. <tr valign="top" align="left">
  319. <td width="11%"></td>
  320. <td width="3%">
  321. <p><b>-D</b></p></td>
  322. <td width="8%"></td>
  323. <td width="78%">
  324. <p>Normally vlmcsd daemonizes and runs in background
  325. (except the native Windows version). If <b>-D</b> is
  326. specified, vlmcsd does not daemonize and runs in foreground.
  327. This is useful for testing and allows you to simply press
  328. &lt;Ctrl-C&gt; to exit vlmcsd.</p></td></tr>
  329. </table>
  330. <p style="margin-left:22%; margin-top: 1em">The native
  331. Windows version never daemonizes and always behaves as if
  332. <b>-D</b> had been specified. You may want to install vlmcsd
  333. as a service instead. See <b>-s</b>.</p>
  334. <table width="100%" border="0" rules="none" frame="void"
  335. cellspacing="0" cellpadding="0">
  336. <tr valign="top" align="left">
  337. <td width="11%"></td>
  338. <td width="3%">
  339. <p style="margin-top: 1em"><b>-e</b></p></td>
  340. <td width="8%"></td>
  341. <td width="78%">
  342. <p style="margin-top: 1em">If specified, vlmcsd ignores
  343. <b>-l</b> and writes all logging output to <b>stdout</b>(3).
  344. This is mainly useful for testing and debugging and often
  345. combined with <b>-D</b>.</p></td></tr>
  346. <tr valign="top" align="left">
  347. <td width="11%"></td>
  348. <td width="3%">
  349. <p><b>-v</b></p></td>
  350. <td width="8%"></td>
  351. <td width="78%">
  352. <p>Use verbose logging. Logs every parameter of the base
  353. request and the base response. It also logs the HWID of the
  354. KMS server if KMS protocol version 6 is used. This option is
  355. mainly for debugging purposes. It only has an effect if some
  356. form of logging is used. Thus <b>-v</b> does not make sense
  357. if not used with <b>-l</b>, <b>-e</b> or <b>-f</b>.</p></td></tr>
  358. <tr valign="top" align="left">
  359. <td width="11%"></td>
  360. <td width="3%">
  361. <p><b>-q</b></p></td>
  362. <td width="8%"></td>
  363. <td width="78%">
  364. <p>Do not use verbose logging. This is actually the default
  365. behavior. It only makes sense if you use vlmcsd with an ini
  366. file (see <b>-i</b> and <b>vlmcsd.ini</b>(5)). If the ini
  367. file contains the line &quot;LogVerbose = true&quot; you can
  368. use <b>-q</b> to restore the default behavior.</p></td></tr>
  369. </table>
  370. <p style="margin-left:11%;"><b>-p</b> <i>filename</i></p>
  371. <p style="margin-left:22%;">Create pid file
  372. <i>filename</i>. This has nothing to do with KMS ePIDs. A
  373. pid file is a file where vlmcsd writes its own process id.
  374. This is used by standard init scripts (typically found in
  375. /etc/init.d). The default is not to write a pid file.</p>
  376. <p style="margin-left:11%;"><b>-u</b> <i>user</i> and
  377. <b>-g</b> <i>group</i></p>
  378. <p style="margin-left:22%;">Causes vlmcsd to run in the
  379. specified <i>user</i> and <i>group</i> security context. The
  380. main purpose for this is to drop root privileges after it
  381. has been started from the root account. To use this feature
  382. from cygwin you must run cyglsa-config and the account from
  383. which vlmcsd is started must have the rights &quot;Act as
  384. part of the operating system&quot; and &quot;Replace a
  385. process level token&quot;. The native Windows version does
  386. not support these options.</p>
  387. <p style="margin-left:22%; margin-top: 1em">The actual
  388. security context switch is performed after the TCP sockets
  389. have been created. This allows you to use privileged ports
  390. (&lt; 1024) when you start vlmcsd from the root account.</p>
  391. <p style="margin-left:22%; margin-top: 1em">However if you
  392. use an ini, pid or log file, you must ensure that the
  393. unprivileged user has access to these files. You can always
  394. log to <b>syslog</b>(3) from an unprivileged account on most
  395. platforms (see <b>-l</b>).</p>
  396. <p style="margin-left:11%;"><b>-w</b> <i>ePID</i></p>
  397. <p style="margin-left:22%;">Use <i>ePID</i> as Windows
  398. ePID. If specified, <b>-r</b> is disregarded for
  399. Windows.</p>
  400. <p style="margin-left:11%;"><b>-0</b> <i>ePID</i></p>
  401. <p style="margin-left:22%;">Use <i>ePID</i> as Office 2010
  402. ePID (including Project and Visio). If specified, <b>-r</b>
  403. is disregarded for Office 2010.</p>
  404. <p style="margin-left:11%;"><b>-3</b> <i>ePID</i></p>
  405. <p style="margin-left:22%;">Use <i>ePID</i> as Office 2013
  406. ePID (including Project and Visio). If specified, <b>-r</b>
  407. is disregarded for Office 2013.</p>
  408. <p style="margin-left:11%;"><b>-6</b> <i>ePID</i></p>
  409. <p style="margin-left:22%;">Use <i>ePID</i> as Office 2016
  410. ePID (including Project and Visio). If specified, <b>-r</b>
  411. is disregarded for Office 2016.</p>
  412. <p style="margin-left:11%;"><b>-H</b> <i>HwId</i></p>
  413. <p style="margin-left:22%;">Use <i>HwId</i> for all
  414. products. All HWIDs in the ini file (see <b>-i</b>) will not
  415. be used. In an ini file you can specify a seperate HWID for
  416. each <i>application-guid</i>. This is not possible when
  417. entering a HWID from the command line.</p>
  418. <p style="margin-left:22%; margin-top: 1em"><i>HwId</i>
  419. must be specified as 16 hex digits that are interpreted as a
  420. series of 8 bytes (big endian). Any character that is not a
  421. hex digit will be ignored. This is for better readability.
  422. The following commands are identical:</p>
  423. <p style="margin-left:22%; margin-top: 1em">vlmcsd -H
  424. 0123456789ABCDEF <br>
  425. vlmcsd -H 01:23:45:67:89:ab:cd:ef <br>
  426. vlmcsd -H &quot;01 23 45 67 89 AB CD EF&quot;</p>
  427. <p style="margin-left:11%;"><b>-i</b> <i>filename</i></p>
  428. <p style="margin-left:22%;">Use configuration file (aka ini
  429. file) <i>filename</i>. Most configuration parameters can be
  430. set either via the command line or an ini file. The command
  431. line always has precedence over configuration items in the
  432. ini file. See <b>vlmcsd.ini</b>(5) for the format of the
  433. configuration file.</p>
  434. <p style="margin-left:22%; margin-top: 1em">If vlmcsd has
  435. been compiled to use a default configuration file (often
  436. /etc/vlmcsd.ini), you may use <b>-i-</b> to ignore the
  437. default configuration file.</p>
  438. <p style="margin-left:11%;"><b>-r0</b>, <b>-r1</b>
  439. (default) and <b>-r2</b></p>
  440. <p style="margin-left:22%;">These options determine how
  441. ePIDs are generated if</p>
  442. <p style="margin-left:22%; margin-top: 1em">- you did not
  443. sprecify an ePID in the command line and <br>
  444. - you haven&rsquo;t used <b>-i</b> or <br>
  445. - the file specified by <b>-i</b> cannot be opened or <br>
  446. - the file specified by <b>-i</b> does not contain an ePID
  447. for the KMS request</p>
  448. <p style="margin-left:22%; margin-top: 1em"><b>-r0</b>
  449. means there are no random ePIDs. vlmcsd simply issues
  450. default ePIDs that are built into the binary at compile
  451. time. <b>Pro:</b> behaves like real KMS server that also
  452. always issues the same ePID. <b>Con:</b> Microsoft may start
  453. blacklisting again and the default ePID may not work any
  454. longer.</p>
  455. <p style="margin-left:22%; margin-top: 1em"><b>-r1</b>
  456. instructs vlmcsd to generate random ePIDs when the program
  457. starts or receives a SIGHUP signal and uses these ePIDs
  458. until it is stopped or receives another SIGHUP. Most other
  459. KMS emulators generate a new ePID on every KMS request. This
  460. is easily detectable. Microsoft could just modify sppsvc.exe
  461. in a way that it always sends two identical KMS requests in
  462. two RPC requests but over the same TCP connection. If both
  463. KMS responses contain the different ePIDs, the KMS server is
  464. not genuine. <b>-r1</b> is the default mode. <b>-r1</b> also
  465. ensures that all three ePIDs (Windows, Office 2010 and
  466. Office 2013) use the same OS build number and LCID (language
  467. id).</p>
  468. <p style="margin-left:22%; margin-top: 1em">If vlmcsd has
  469. been started by an internet superserver, <b>-r1</b> works
  470. almost identically to <b>-r2</b>. The only exception occurs
  471. if you send more than one activation request over the same
  472. TCP connection. This is simply due to the fact that vlmcsd
  473. is started upon a connection request and does not stay in
  474. memory after servicing a KMS request. Consider using
  475. <b>-r0</b> or <b>-w</b>, <b>-0</b>, <b>-3</b> and <b>-6 when
  476. starting vlmcsd by an internet superserver.</b></p>
  477. <p style="margin-left:22%; margin-top: 1em"><b>-r2</b>
  478. behaves like most other KMS server emulators with random
  479. support and generates a new random ePID on every request.
  480. <b>-r2</b> should be treated as debugging option only
  481. because it allows very easy emulator detection.</p>
  482. <p style="margin-left:11%;"><b>-C</b> <i>LCID</i></p>
  483. <p style="margin-left:22%;">Do not randomize the locale id
  484. part of the ePID and use <i>LCID</i> instead. The
  485. <i>LCID</i> must be specified as a decimal number, e.g. 1049
  486. for &quot;Russian - Russia&quot;. This option has no effect
  487. if the ePID is not randomized at all, e.g. if it is selected
  488. from the command line or an ini file.</p>
  489. <p style="margin-left:22%; margin-top: 1em">By default
  490. vlmcsd generates a valid locale id that is recognized by
  491. .NET Framework 4.0. This may lead to a locale id which is
  492. unlikely to occur in your country, for instance 2155 for
  493. &quot;Quecha - Ecuador&quot;. You may want to select the
  494. locale id of your country instead. See
  495. <a href="http://msdn.microsoft.com/en-us/goglobal/bb964664.aspx">MSDN</a>
  496. for a list of valid <i>LCID</i>s. Please note that some of
  497. them are not recognized by .NET Framework 4.0.</p>
  498. <p style="margin-left:22%; margin-top: 1em">Most other KMS
  499. emulators use a fixed <i>LCID</i> of 1033 (English - US). To
  500. achive the same behavior in vlmcsd use <b>-C 1033</b>.</p>
  501. <p style="margin-left:11%;"><b>-R</b>
  502. <i>renewal-interval</i></p>
  503. <p style="margin-left:22%;">Instructs clients to renew
  504. activation every <i>renewal-interval</i>. The
  505. <i>renewal-interval</i> is a number optionally immediately
  506. followed by a letter indicating the unit. Valid unit letters
  507. are s (seconds), m (minutes), h (hours), d (days) and w
  508. (weeks). If you do not specify a letter, minutes is
  509. assumed.</p>
  510. <p style="margin-left:22%; margin-top: 1em"><b>-R3d</b> for
  511. instance instructs clients to renew activation every 3 days.
  512. The default <i>renewal-interval</i> is 10080 (identical to
  513. 7d and 1w).</p>
  514. <p style="margin-left:22%; margin-top: 1em">Due to poor
  515. implementation of Microsofts KMS Client it cannot be
  516. guaranteed that activation is renewed on time as specfied by
  517. the -R option. Don&rsquo;t care about that. Renewal will
  518. happen well before your activation expires (usually 180
  519. days).</p>
  520. <p style="margin-left:22%; margin-top: 1em">Even though you
  521. can specify seconds, the granularity of this option is 1
  522. minute. Seconds are rounded down to the next multiple of
  523. 60.</p>
  524. <p style="margin-left:11%;"><b>-A</b>
  525. <i>activation-interval</i></p>
  526. <p style="margin-left:22%;">Instructs clients to retry
  527. activation every <i>activation-interval</i> if it was
  528. unsuccessful, e.g. because it could not reach the server.
  529. The default is 120 (identical to 2h).
  530. <i>activation-interval</i> follows the same syntax as
  531. <i>renewal-interval</i> in the <b>-R</b> option.</p>
  532. <table width="100%" border="0" rules="none" frame="void"
  533. cellspacing="0" cellpadding="0">
  534. <tr valign="top" align="left">
  535. <td width="11%"></td>
  536. <td width="3%">
  537. <p><b>-s</b></p></td>
  538. <td width="8%"></td>
  539. <td width="78%">
  540. <p>Installs vlmcsd as a Windows service. This option only
  541. works with the native Windows version and Cygwin. Combine
  542. <b>-s</b> with other command line options. These will be in
  543. effect when you start the service. The service automatically
  544. starts when you reboot your machine. To start it manually,
  545. type &quot;net start vlmcsd&quot;.</p></td></tr>
  546. </table>
  547. <p style="margin-left:22%; margin-top: 1em">If you use
  548. Cygwin, you must include your Cygwin system DLL directory
  549. (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the PATH
  550. environment variable or the service will not start.</p>
  551. <p style="margin-left:22%; margin-top: 1em">You can
  552. reinstall the service anytime using vlmcsd -s again, e.g.
  553. with a different command line. If the service is running, it
  554. will be restarted with the new command line.</p>
  555. <p style="margin-left:22%; margin-top: 1em">When using
  556. <b>-s</b> the command line is checked for basic syntax
  557. errors only. For example &quot;vlmcsd -s -L 1.2.3.4&quot;
  558. reports no error but the service will not start if 1.2.3.4
  559. is not an IP address on your system.</p>
  560. <table width="100%" border="0" rules="none" frame="void"
  561. cellspacing="0" cellpadding="0">
  562. <tr valign="top" align="left">
  563. <td width="11%"></td>
  564. <td width="3%">
  565. <p style="margin-top: 1em"><b>-S</b></p></td>
  566. <td width="8%"></td>
  567. <td width="78%">
  568. <p style="margin-top: 1em">Uninstalls the vlmcsd service.
  569. Works only with the native Windows version and Cygwin. All
  570. other options will be ignored if you include -S in the
  571. command line.</p></td></tr>
  572. </table>
  573. <p style="margin-left:11%;"><b>-U</b>
  574. [<i>domain</i>\]<i>username</i></p>
  575. <p style="margin-left:22%;">Can only be used together with
  576. <b>-s</b>. Starts the service as a different user than the
  577. local SYSTEM account. This is used to run the service under
  578. an account with low privileges. If you omit the domain, an
  579. account from the local computer will be used.</p>
  580. <p style="margin-left:22%; margin-top: 1em">You may use
  581. &quot;NT AUTHORITY\NetworkService&quot;. This is a pseudo
  582. user with low privileges. You may also use &quot;NT
  583. AUTHORITY\LocalService&quot; which has more privileges but
  584. these are of no use for running vlmcsd.</p>
  585. <p style="margin-left:22%; margin-top: 1em">Make sure that
  586. the user you specify has at least execute permission for
  587. your executable. &quot;NT AUTHORITY\NetworkService&quot;
  588. normally has no permission to run binaries from your home
  589. directory.</p>
  590. <p style="margin-left:22%; margin-top: 1em">For your
  591. convenience you can use the special username &quot;/l&quot;
  592. as a shortcut for &quot;NT AUTHORITY\LocalService&quot; and
  593. &quot;/n&quot; for &quot;NT AUTHORITY\NetworkService&quot;.
  594. &quot;vlmcsd&nbsp;&minus;s&nbsp;&minus;U&nbsp;/n&quot;
  595. installs the service to run as &quot;NT
  596. AUTHORITY\NetworkService&quot;.</p>
  597. <p style="margin-left:11%;"><b>-W</b> <i>password</i></p>
  598. <p style="margin-left:22%;">Can only be used together with
  599. <b>-s</b>. Specifies a <i>password</i> for the corresponding
  600. username you use with -U. SYSTEM, &quot;NT
  601. AUTHORITY\NetworkService&quot;, &quot;NT
  602. AUTHORITY\LocalService&quot; do not require a password.</p>
  603. <p style="margin-left:22%; margin-top: 1em">If you specify
  604. a user with even lower privileges than &quot;NT
  605. AUTHORITY\NetworkService&quot;, you must specify its
  606. password. You also have to grant the &quot;Log on as a
  607. service&quot; right to that user.</p>
  608. <h2>SIGNALS
  609. <a name="SIGNALS"></a>
  610. </h2>
  611. <p style="margin-left:11%; margin-top: 1em">The following
  612. signals differ from the default behavior: <b><br>
  613. SIGTERM</b>, <b>SIGINT</b></p>
  614. <p style="margin-left:22%;">These signals cause vlmcsd to
  615. exit gracefully. All global semaphores and shared memory
  616. pages will be released, the pid file will be unlinked
  617. (deleted) and a shutdown message will be logged.</p>
  618. <table width="100%" border="0" rules="none" frame="void"
  619. cellspacing="0" cellpadding="0">
  620. <tr valign="top" align="left">
  621. <td width="11%"></td>
  622. <td width="9%">
  623. <p><b>SIGHUP</b></p></td>
  624. <td width="2%"></td>
  625. <td width="78%">
  626. <p>Causes vlmcsd to be restarted completely. This is useful
  627. if you started vlmcsd with an ini file. You can modify the
  628. ini file while vlmcsd is running and then sending
  629. <b>SIGHUP</b>, e.g. by typing &quot;killall -SIGHUP
  630. vlmcsd&quot; or &quot;kill -SIGHUP &rsquo;cat
  631. /var/run/vlmcsd.pid&rsquo;&quot;.</p> </td></tr>
  632. </table>
  633. <p style="margin-left:22%; margin-top: 1em">The SIGHUP
  634. handler has been implemented relatively simple. It is
  635. virtually the same as stopping vlmcsd and starting it again
  636. immediately with the following exceptions:</p>
  637. <table width="100%" border="0" rules="none" frame="void"
  638. cellspacing="0" cellpadding="0">
  639. <tr valign="top" align="left">
  640. <td width="22%"></td>
  641. <td width="1%">
  642. <p style="margin-top: 1em">&mdash;</p></td>
  643. <td width="3%"></td>
  644. <td width="74%">
  645. <p style="margin-top: 1em">The new process does not get a
  646. new process id.</p></td></tr>
  647. <tr valign="top" align="left">
  648. <td width="22%"></td>
  649. <td width="1%">
  650. <p>&mdash;</p></td>
  651. <td width="3%"></td>
  652. <td width="74%">
  653. <p>If you used a pid file, it is not deleted and recreated
  654. because the process id stays the same.</p></td></tr>
  655. <tr valign="top" align="left">
  656. <td width="22%"></td>
  657. <td width="1%">
  658. <p>&mdash;</p></td>
  659. <td width="3%"></td>
  660. <td width="74%">
  661. <p>If you used the &rsquo;user&rsquo; and/or
  662. &rsquo;group&rsquo; directive in an ini file these are
  663. ignored. This is because once you switched to lower
  664. privileged users and groups, there is no way back. Anything
  665. else would be a severe security flaw in the OS.</p></td></tr>
  666. </table>
  667. <p style="margin-left:11%; margin-top: 1em">Signaling is
  668. not available in the native Windows version and in the
  669. Cygwin version when it runs as Windows service.</p>
  670. <h2>SUPPORTED OPERATING SYSTEMS
  671. <a name="SUPPORTED OPERATING SYSTEMS"></a>
  672. </h2>
  673. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
  674. compiles and runs on Linux, Windows (no Cygwin required but
  675. explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD,
  676. Dragonfly BSD, Minix, Solaris, OpenIndiana, Android and iOS.
  677. Other POSIX or unixoid OSses may work with unmodified
  678. sources or may require minor porting efforts.</p>
  679. <h2>SUPPORTED PRODUCTS
  680. <a name="SUPPORTED PRODUCTS"></a>
  681. </h2>
  682. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd</b>
  683. can answer activation requests for the following products:
  684. Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10
  685. (up to 1607), Windows Server 2008, Windows Server 2008 R2,
  686. Windows Server 2012, Windows Server 2012 R2, Windows Server
  687. 2016, Office 2010, Project 2010, Visio 2010, Office 2013,
  688. Project 2013, Visio 2013, Office 2016, Project 2016, Visio
  689. 2016. Newer version may work as long as the KMS protocol
  690. does not change. A complete list of fully supported products
  691. can be obtained using the <b>-x</b> option of
  692. <b>vlmcs</b>(1).</p>
  693. <p style="margin-left:11%; margin-top: 1em">Office, Project
  694. and Visio must be volume license versions.</p>
  695. <h2>FILES
  696. <a name="FILES"></a>
  697. </h2>
  698. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd.ini</b>(5)</p>
  699. <h2>EXAMPLES
  700. <a name="EXAMPLES"></a>
  701. </h2>
  702. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd
  703. -De</b></p>
  704. <p style="margin-left:22%;">Starts <b>vlmcsd</b> in
  705. foreground. Useful if you use it for the first time and want
  706. to see what&rsquo;s happening when a client requests
  707. activation.</p>
  708. <p style="margin-left:11%;"><b>vlmcsd -l
  709. /var/log/vlmcsd.log</b></p>
  710. <p style="margin-left:22%;">Starts <b>vlmcsd</b> as a
  711. daemon and logs everything to /var/log/vlmcsd.log.</p>
  712. <p style="margin-left:11%;"><b>vlmcsd -L
  713. 192.168.1.17</b></p>
  714. <p style="margin-left:22%;">Starts <b>vlmcsd</b> as a
  715. daemon and listens on IP address 192.168.1.17 only. This is
  716. useful for routers that have a public and a private IP
  717. address to prevent your KMS server from becoming public.</p>
  718. <p style="margin-left:11%;"><b>vlmcsd -s -U /n -l
  719. C:\logs\vlmcsd.log</b></p>
  720. <p style="margin-left:22%;">Installs <b>vlmcsd</b> as a
  721. Windows service with low privileges and logs everything to
  722. C:\logs\vlmcsd.log when the service is started with
  723. &quot;net start vlmcsd&quot;.</p>
  724. <h2>BUGS
  725. <a name="BUGS"></a>
  726. </h2>
  727. <p style="margin-left:11%; margin-top: 1em">An ePID
  728. specified in an ini file must not contain spaces.</p>
  729. <h2>INTENTIONAL BUGS
  730. <a name="INTENTIONAL BUGS"></a>
  731. </h2>
  732. <p style="margin-left:11%; margin-top: 1em">vlmcsd
  733. activates non-VL (retail) and beta/preview versions of
  734. Windows. <br>
  735. vlmcsd always reports enough active clients to satisfy the N
  736. count policy of the request.</p>
  737. <h2>AUTHOR
  738. <a name="AUTHOR"></a>
  739. </h2>
  740. <p style="margin-left:11%; margin-top: 1em">Written by
  741. crony12, Hotbird64 and vityan666. With contributions from
  742. DougQaid.</p>
  743. <h2>CREDITS
  744. <a name="CREDITS"></a>
  745. </h2>
  746. <p style="margin-left:11%; margin-top: 1em">Thanks to
  747. CODYQX4, deagles, eIcn, mikmik38, nosferati87, qad,
  748. Ratiborus, ...</p>
  749. <h2>SEE ALSO
  750. <a name="SEE ALSO"></a>
  751. </h2>
  752. <p style="margin-left:11%; margin-top: 1em"><b>vlmcsd.ini</b>(5),
  753. <b>vlmcsd</b>(7), <b>vlmcs</b>(1), <b>vlmcsdmulti</b>(1)</p>
  754. <hr>
  755. </body>
  756. </html>