vlmcsd.8.dos.txt 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  1. VLMCSD(8) KMS Activation Manual VLMCSD(8)
  2. NAME
  3. vlmcsd - a fully Microsoft compatible KMS server
  4. SYNOPSIS
  5. vlmcsd [ options ]
  6. DESCRIPTION
  7. vlmcsd is a fully Microsoft compatible KMS server that provides product
  8. activation services to clients. It is meant as a drop-in replacement
  9. for a Microsoft KMS server (Windows computer with KMS key entered). It
  10. currently supports KMS protocol versions 4, 5 and 6.
  11. vlmcsd is designed to run on POSIX compatible operating systens. It
  12. only requires a basic C library with a BSD-style sockets API and either
  13. fork(2) or pthreads(7). That allows it to run on most embedded systems
  14. like routers, NASes, mobile phones, tablets, TVs, settop boxes, etc.
  15. Some efforts have been made that it also runs on Windows.
  16. Although vlmcsd does neither require an activation key nor a payment to
  17. anyone, it is not meant to run illegal copies of Windows. Its purpose
  18. is to ensure that owners of legal copies can use their software without
  19. restrictions, e.g. if you buy a new computer or motherboard and your
  20. key will be refused activation from Microsoft servers due to hardware
  21. changes.
  22. vlmcsd may be started via an internet superserver like inetd(8) or
  23. xinetd(8) as well as an advanced init system like systemd(8) or
  24. launchd(8) using socket based activation. If vlmcsd detects that
  25. stdin(3) is a socket, it assumes that there is already a connected
  26. client on stdin that wants to be activated.
  27. All options that control setting up listening sockets will be ignored
  28. when in inetd mode. The sockets will be set up by your internet super-
  29. server. You also cannot limit the number of simultanous clients (option
  30. -m). You need to configure the limit in your internet superserver.
  31. The followong features that require that vlmcsd is permanently loaded
  32. will not work if started from an internet superserver:
  33. You cannot maintain a client list (option -M1)
  34. EPID Randomization Level 1 (option -r1) works like Level 2
  35. (-r2). You may want to use Level 0 (-r0) or custom EPIDs
  36. (options -w, -G, -0, -3 and -6) instead.
  37. OPTIONS
  38. Since vlmcsd can be configured at compile time, some options may not be
  39. available on your system.
  40. All options that do no require an argument may be combined with a sin-
  41. gle dash, for instance "vlmcsd -D -e" is identical to "vlmcsd -De". For
  42. all options that require an argument a space between the option and the
  43. option argument is optional. Thus "vlmcsd -r 2" and "vlmcsd -r2" are
  44. identical too.
  45. -h or -?
  46. Displays help.
  47. -V Displays extended version information. This includes the com-
  48. piler used to build vlmcsd, the intended platform and flags
  49. (compile time options) to build vlmcsd. If you have the source
  50. code of vlmcsd, you can type make help (or gmake help on systems
  51. that do not use the GNU version of make(1) by default) to see
  52. the meaning of those flags.
  53. -L ipaddress[:port]
  54. Instructs vlmcsd to listen on ipaddress with optional port
  55. (default 1688). You can use this option more than once. If you
  56. do not specify -L at least once, IP addresses 0.0.0.0 (IPv4) and
  57. :: (IPv6) are used. If the IP address contains colons (IPv6) you
  58. must enclose the IP address in brackets if you specify the
  59. optional port, e.g. [2001:db8::dead:beef]:1688.
  60. If no port is specified, vlmcsd uses the default port according
  61. to a preceding -P option. If you specify a port, it can be a
  62. number (1-65535) or a name (usually found in /etc/services if
  63. not provided via LDAP, NIS+ or another name service).
  64. If you specify a link local IPv6 address (fe80::/10, usually
  65. starting with fe80::), it must be followed by a percent sign (%)
  66. and a scope id (=network interface name or number) on most
  67. unixoid OSses including Linux, Android, MacOS X and iOS, e.g.
  68. fe80::1234:56ff:fe78:9abc%eth0 or
  69. [fe80::1234:56ff:fe78:9abc%2]:1688. Windows (including cygwin)
  70. does not require a scope id unless the same link local address
  71. is used on more than one network interface. Windows does not
  72. accept a name and the scope id must be a number.
  73. -o level
  74. Sets the level of protection against activations from public IP
  75. addresses. The default is -o0 for no protection.
  76. -o1 causes vlmcsd not to listen on all IP addresses but on pri-
  77. vate IP addresses only. IPv4 addresses in the 100.64.0.0/10
  78. range (see RFC6598) are not treated as private since they can be
  79. reached from other users of your ISP. Private IPv4 addresses are
  80. 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16 and
  81. 127.0.0.0/8. vlmcsd treats all IPv6 addresses not within
  82. 2000::/3 as private addresses.
  83. If -o1 is combined with -L, it will listen on all private IP
  84. addresses plus the ones specified by one or more -L statements.
  85. If -o1 is combined with -P, only the last -P statement will be
  86. used.
  87. Using -o1 does not protect you if you enable NAT port forwarding
  88. on your router to your vlmcsd machine. It is identical to using
  89. multiple -L statements with all of your private IP addresses.
  90. What -o1 does for you, is automatically enumerating your private
  91. IP addresses.
  92. -o2 does not affect the interfaces, vlmcsd is listening on. When
  93. a clients connects, vlmcsd immediately drops the connection if
  94. the client has a public IP address. Unlike -o1 clients will be
  95. able to establish a TCP connection but it will be closed without
  96. a single byte sent over the connection. This protects against
  97. clients with public IP addresses even if NAT port forwarding is
  98. used. While -o2 offers a higher level of protection than -o1,
  99. the client sees that the KMS TCP port (1688 by default) is actu-
  100. ally accepting connections.
  101. If vlmcsd is compiled to use MS RPC, -o2 can only offer very
  102. poor protection. Control is passed from MS RPC to vlmcsd after
  103. the KMS protocol has already been negotiated. Thus a client can
  104. always verify that the KMS protocol is available even though it
  105. receives an RPC_S_ACCESS_DENIED error message. vlmcsd will issue
  106. a warning if -o2 is used with MS RPC. For adaequate protection
  107. do not use a MS RPC build of vlmcsd with -o2.
  108. -o3 combines -o1 and -o2. vlmcsd listens on private interfaces
  109. only and if a public client manages to connect anyway due to NAT
  110. port forwarding, it will be immediately dropped.
  111. If you use any form of TCP level port forwarding (e.g. nc(1),
  112. netcat(1), ssh(1) port forwarding or similar) to redirect KMS
  113. requests to vlmcsd, there will be no protection even if you use
  114. -o2 or -o3. This is due to the simple fact that vlmcsd sees the
  115. IP address of the redirector and not the IP address of the
  116. client.
  117. -o1 (and thus -o3) is not (yet) available in some scenarios:
  118. FreeBSD: There is a longtime unfixed bug <https://
  119. bugs.freebsd.org/bugzilla/show_bug.cgi?id=178881> in the
  120. 32-bit ABI of the 64-bit kernel. If you have a 64-bit Free-
  121. BSD kernel, you must run the 64-bit version of vlmcsd if
  122. you use -o1 or -o3. The 32-bit version causes undefined
  123. behavior up to crashing vlmcsd. Other BSDs (NetBSD, Open-
  124. BSD, Dragonfly and Mac OS X) work correctly.
  125. If vlmcsd was started by an internet superserver or was
  126. compiled to use Microsoft RPC (Windows only) or simple
  127. sockets, -o1 and -o3 are not available by design.
  128. -P port
  129. Use TCP port for all subsequent -L statements that do not
  130. include an optional port. If you use -P and -L, -P must be spec-
  131. ified before -L.
  132. -O vpn-adapter-name[=ipv4-address][/cidr-mask][:dhcp-lease-duration]
  133. Enables a compatible VPN adapter to create additional local IPv4
  134. addresses (like 127.0.0.1) that appear as remote IPv4 addresses
  135. to the system. This allows product activation using a local
  136. instance of vlmcsd. This feature is only available in Windows
  137. and Cygwin builds of vlmcsd since it is not of any use on other
  138. operating systems. Compatible VPN adapters are Tap-windows ver-
  139. sion 8.2 or higher (from OpenVPN) and the TeamViewer VPN
  140. adapter. There are two special vpn-adapter-names. A single
  141. period (.) instructs vlmcsd to use the first available compati-
  142. ble VPN adapter. A single dash (-) disables the use of a VPN
  143. adapter if one has been configured in vlmcsd.ini(5). The vpn-
  144. adapter-name is not case-sensitive. If the vpn-adapter-name con-
  145. tains spaces (e.g. Ethernet 3), you must enclose it in quotes.
  146. The default ipv4-address is 10.10.10.9 and the default cidr-mask
  147. is 30. If you are using the default values, your VPN adapter
  148. uses an IPv4 address of 10.10.10.9 and you can set your activa-
  149. tion client to use the easy to remember address 10.10.10.10
  150. (e.g. slmgr /skms 10.10.10.10 or cscript ospp.vbs
  151. /sethst:10.10.10.10).
  152. The dhcp-lease-duration is a number optionally followed by s, m,
  153. h, d or w to indicate seconds, minutes, hours, days or weeks.
  154. The default dhcp-lease-duration is 1d (one day). It is normally
  155. not required to change this value.
  156. It is advised not to manually configure your OpenVPN TAP or
  157. TeamViewer VPN adapter in "Network Connections". If you set the
  158. IPv4 configuration manually anyway, the IPv4 address and the
  159. subnet mask must match the -O parameter. It is safe leave the
  160. IPv4 configuration to automatic (DHCP). vlmcsd will wait up to
  161. four seconds for the DHCP configuration to complete before bind-
  162. ing to and listenin on any interfaces.
  163. You should be aware that only one program can use a VPN adapter
  164. at a time. If you use the TeamViewer VPN adapter for example,
  165. you will not be able to use the VPN feature of TeamViewer as
  166. long as vlmcsd is running. The same applies to OpenVPN TAP
  167. adapters that are in use by other programs (for example OpenVPN,
  168. QEMU, Ratiborus VM, aiccu, etc.). The best way to avoid con-
  169. flicts is to install Tap-Windows from OpenVPN, cd to C:\Program
  170. Files\TAP-Windows\bin and run addtap.bat to install an addi-
  171. tional TAP adapter. Go to "Network Connections" and rename the
  172. new adapter to "vlmcsd" and specify -O vlmcsd to use it.
  173. Example: -O "Ethernet 7"=192.168.123.1/24 (uses VPN adapter Eth-
  174. ernet 7 with IPv4 address 192.168.123.1 and have 192.168.123.2
  175. to 192.168.123.254 as additional local (but apparently remote)
  176. IPv4 addresses.
  177. -x0 and -x1
  178. Controls under what circumstances vlmcsd will exit. Using the
  179. default of -x0 vlmcsd stays active as long as it can perform
  180. some useful operations. If vlmcsd is run by any form of a watch-
  181. dog, e.g. NT service manager (Windows), systemd (Linux) or
  182. launchd (Mac OS / iOS), it may be desirable to end vlmcsd and
  183. let the watchdog restart it. This is especially true if some
  184. pre-requisites are not yet met but will be some time later, e.g.
  185. network is not yet fully setup.
  186. By using -x0 vlmcsd will
  187. exit if none of the listening sockets specified with -L can
  188. be used. It continues if at least one socket can be setup
  189. for listening.
  190. exit any TAP mirror thread (Windows version only) if there
  191. is an error condition while reading or writing from or to
  192. the VPN adapter but continue to work without utilizing a
  193. VPN adapter.
  194. By using -x1 vlmcsd will
  195. exit if not all listening sockets specified with -L can be
  196. used.
  197. exit completely if there is a problem with a VPN adapter it
  198. is using. This can happen for instance if the VPN adapter
  199. has been disabled using "Control Panel - Network - Adapter
  200. Settings" while vlmcsd is using it.
  201. Please note that -x1 is kind of a workaround option. While it
  202. may help under some circumstances, it is better to solve the
  203. problem at its origin, e.g. properly implementing dependencies
  204. in your startup script to ensure all network interfaces and the
  205. VPN adapter you will use are completely setup before you start
  206. vlmcsd.
  207. -F0 and -F1
  208. Allow (-F1) or disallow (-F0) binding to IP addresses that are
  209. currently not configured on your system. The default is -F0. -F1
  210. allows you to bind to an IP address that may be configured after
  211. you started vlmcsd. vlmcsd will listen on that address as soon
  212. as it becomes available. This feature is only available under
  213. Linux (IPv4 and IPv6) and FreeBSD (IPv4 only). FreeBSD allows
  214. this feature only for the root user (more correctly: processes
  215. that have the PRIV_NETINET_BINDANY privilege). Linux does not
  216. require a capability for this.
  217. -t seconds
  218. Timeout the TCP connection with the client after seconds sec-
  219. onds. After sending an activation request. RPC keeps the TCP
  220. connection for a while. The default is 30 seconds. You may spec-
  221. ify a shorter period to free ressources on your device faster.
  222. This is useful for devices with limited main memory or if you
  223. used -m to limit the concurrent clients that may request activa-
  224. tion. Microsoft RPC clients disconnect after 30 seconds by
  225. default. Setting seconds to a greater value does not make much
  226. sense.
  227. -m concurrent-clients
  228. Limit the number of clients that will be handled concurrently.
  229. This is useful for devices with limited ressources or if you are
  230. experiencing DoS attacks that spawn thousands of threads or
  231. forked processes. If additional clients connect to vlmcsd, they
  232. need to wait until another client disconnects. If you set con-
  233. current-clients to a small value ( <10 ), you should also select
  234. a reasonable timeout of 2 or 3 seconds with -t. The default is
  235. no limit.
  236. -d Disconnect each client after processing one activation request.
  237. This is a direct violation of DCE RPC but may help if you
  238. receive malicous fake RPC requests that block your threads or
  239. forked processes. Some other KMS emulators (e.g. py-kms) behave
  240. this way.
  241. -k Do not disconnect clients after processing an activation
  242. request. This selects the default behavior. -k is useful only if
  243. you used an ini file (see vlmcsd.ini(5) and -i). If the ini file
  244. contains the line "DisconnectClientsImmediately = true", you can
  245. use this switch to restore the default behavior.
  246. -N0 and -N1
  247. Disables (-N0) or enables (-N1) the use of the NDR64 transfer
  248. syntax in the RPC protocol. Unlike Microsoft vlmcsd supports
  249. NDR64 on 32-bit operating systems. Microsoft introduced NDR64 in
  250. Windows Vista but their KMS servers started using it with Win-
  251. dows 8. Thus if you choose random ePIDs, vlmcsd will select
  252. ePIDs with build numbers 9200 and 9600 if you enable NDR64 and
  253. build numbers 6002 and 7601 if you disable NDR64. The default is
  254. to enable NDR64.
  255. -B0 and -B1
  256. Disables (-B0) or enables (-B1) bind time feature negotiation
  257. (BTFN) in the RPC protocol. All Windows operating systems start-
  258. ing with Vista support BTFN and try to negotiate it when initi-
  259. ating an RPC connection. Thus consider turning it off as a debug
  260. / troubleshooting feature only. Some older firewalls that selec-
  261. tively block or redirect RPC traffic may get confused when they
  262. detect NDR64 or BTFN.
  263. -l filename
  264. Use filename as a log file. The log file records all activations
  265. with IP address, Windows workstation name (no reverse DNS
  266. lookup), activated product, KMS protocol, time and date. If you
  267. do not specify a log file, no log is created. For a live view of
  268. the log file type tail -f file.
  269. If you use the special filename "syslog", vlmcsd uses syslog(3)
  270. for logging. If your system has no syslog service (/dev/log)
  271. installed, logging output will go to /dev/console. Syslog log-
  272. ging is not available in the native Windows version. The Cygwin
  273. version does support syslog logging.
  274. -T0 and -T1
  275. Disable (-T0) or enable (-T1) the inclusion of date and time in
  276. each line of the log. The default is -T1. -T0 is useful if you
  277. log to stdout(3) which is redirected to another logging mecha-
  278. nism that already includes date and time in its output, for
  279. instance systemd-journald(8). If you log to syslog(3), -T1 is
  280. ignored and date and time will never be included in the output
  281. sent to syslog(3).
  282. -D Normally vlmcsd daemonizes and runs in background (except the
  283. native Windows version). If -D is specified, vlmcsd does not
  284. daemonize and runs in foreground. This is useful for testing and
  285. allows you to simply press <Ctrl-C> to exit vlmcsd.
  286. The native Windows version never daemonizes and always behaves
  287. as if -D had been specified. You may want to install vlmcsd as a
  288. service instead. See -s.
  289. -e If specified, vlmcsd ignores -l and writes all logging output to
  290. stdout(3). This is mainly useful for testing and debugging and
  291. often combined with -D.
  292. -v Use verbose logging. Logs every parameter of the base request
  293. and the base response. It also logs the HWID of the KMS server
  294. if KMS protocol version 6 is used. This option is mainly for
  295. debugging purposes. It only has an effect if some form of log-
  296. ging is used. Thus -v does not make sense if not used with -l,
  297. -e or -f.
  298. -q Do not use verbose logging. This is actually the default behav-
  299. ior. It only makes sense if you use vlmcsd with an ini file (see
  300. -i and vlmcsd.ini(5)). If the ini file contains the line
  301. "LogVerbose = true" you can use -q to restore the default behav-
  302. ior.
  303. -p filename
  304. Create pid file filename. This has nothing to do with KMS ePIDs.
  305. A pid file is a file where vlmcsd writes its own process id.
  306. This is used by standard init scripts (typically found in
  307. /etc/init.d). The default is not to write a pid file.
  308. -u user and -g group
  309. Causes vlmcsd to run in the specified user and group security
  310. context. The main purpose for this is to drop root privileges
  311. after it has been started from the root account. To use this
  312. feature from cygwin you must run cyglsa-config and the account
  313. from which vlmcsd is started must have the rights "Act as part
  314. of the operating system" and "Replace a process level token".
  315. The native Windows version does not support these options.
  316. The actual security context switch is performed after the TCP
  317. sockets have been created. This allows you to use privileged
  318. ports (< 1024) when you start vlmcsd from the root account.
  319. However if you use an ini, pid or log file, you must ensure that
  320. the unprivileged user has access to these files. You can always
  321. log to syslog(3) from an unprivileged account on most platforms
  322. (see -l).
  323. -a CSVLK = ePID [ / HwId ]
  324. Use ePID and HwId for a specific CSVLK. When you use it, -r is
  325. disregarded for this CSVLK. If vlmcsd uses the default vlm-
  326. csd.kmd database, you can use the following CSVLKs: Windows,
  327. WinChinaGov, Office2010, Office2013, Office2016 and Office2019.
  328. The -a option requires that database version 1.6 or later is
  329. used.
  330. HwId must be specified as 16 hex digits that are interpreted as
  331. a series of 8 bytes (big endian). Any character that is not a
  332. hex digit will be ignored. This is for better readability.
  333. -i filename
  334. Use configuration file (aka ini file) filename. Most configura-
  335. tion parameters can be set either via the command line or an ini
  336. file. The command line always has precedence over configuration
  337. items in the ini file. See vlmcsd.ini(5) for the format of the
  338. configuration file.
  339. If vlmcsd has been compiled to use a default configuration file
  340. (often /etc/vlmcsd.ini), you may use -i- to ignore the default
  341. configuration file.
  342. -j filename
  343. Use KMS data file filename. By default vlmcsd only contains the
  344. minimum product data that is required to perform all operations
  345. correctly. You may use a more complete KMS data file that con-
  346. tains all detailed product names. This is especially useful if
  347. you are logging KMS requests. If you don't log, there is no need
  348. to load an external KMS data file.
  349. If vlmcsd has been compiled to use a default KMS data file, you
  350. may use -j- to ignore the default configuration file.
  351. -r0, -r1 (default) and -r2
  352. These options determine how ePIDs are generated if
  353. - you did not sprecify an ePID in the command line and
  354. - you haven't used -i or
  355. - the file specified by -i cannot be opened or
  356. - the file specified by -i does not contain an ePID for the KMS
  357. request
  358. -r0 means there are no random ePIDs. vlmcsd simply issues
  359. default ePIDs that are built into the binary at compile time.
  360. Pro: behaves like real KMS server that also always issues the
  361. same ePID. Con: Microsoft may start blacklisting again and the
  362. default ePID may not work any longer.
  363. -r1 instructs vlmcsd to generate random ePIDs when the program
  364. starts or receives a SIGHUP signal and uses these ePIDs until it
  365. is stopped or receives another SIGHUP. Most other KMS emulators
  366. generate a new ePID on every KMS request. This is easily
  367. detectable. Microsoft could just modify sppsvc.exe in a way that
  368. it always sends two identical KMS requests in two RPC requests
  369. but over the same TCP connection. If both KMS responses contain
  370. the different ePIDs, the KMS server is not genuine. -r1 is the
  371. default mode. -r1 also ensures that all three ePIDs (Windows,
  372. Office 2010 and Office 2013) use the same OS build number and
  373. LCID (language id).
  374. If vlmcsd has been started by an internet superserver, -r1 works
  375. almost identically to -r2. The only exception occurs if you send
  376. more than one activation request over the same TCP connection.
  377. This is simply due to the fact that vlmcsd is started upon a
  378. connection request and does not stay in memory after servicing a
  379. KMS request. Consider using -r0 or -w, -G, -0, -3 and -6 when
  380. starting vlmcsd by an internet superserver.
  381. -r2 behaves like most other KMS server emulators with random
  382. support and generates a new random ePID on every request. -r2
  383. should be treated as debugging option only because it allows
  384. very easy emulator detection.
  385. -C LCID
  386. Do not randomize the locale id part of the ePID and use LCID
  387. instead. The LCID must be specified as a decimal number, e.g.
  388. 1049 for "Russian - Russia". This option has no effect if the
  389. ePID is not randomized at all, e.g. if it is selected from the
  390. command line or an ini file.
  391. By default vlmcsd generates a valid locale id that is recognized
  392. by .NET Framework 4.0. This may lead to a locale id which is
  393. unlikely to occur in your country, for instance 2155 for "Quecha
  394. - Ecuador". You may want to select the locale id of your country
  395. instead. See MSDN <http://msdn.microsoft.com/en-us/goglobal/
  396. bb964664.aspx> for a list of valid LCIDs. Please note that some
  397. of them are not recognized by .NET Framework 4.0.
  398. Most other KMS emulators use a fixed LCID of 1033 (English -
  399. US). To achive the same behavior in vlmcsd use -C 1033.
  400. -H HostBuild
  401. Do not randomize the host build number in the ePID and use Host-
  402. Build instead, for instance 17763 for Windows Server 2019 / Win-
  403. dows 10 1809.
  404. -K0, -K1, -K2 and -K3
  405. Sets the whitelisting level to determine which products vlmcsd
  406. activates or refuses. The default is -K0.
  407. -K0: activate all products with an unknown, retail or
  408. beta/preview KMS ID.
  409. -K1: activate products with a retail or beta/preview KMS ID
  410. but refuse to activate products with an unknown KMS ID.
  411. -K2: activate products with an unknown KMS ID but refuse
  412. products with a retail or beta/preview KMS ID.
  413. -K3: activate only products with a known volume license RTM
  414. KMS ID and refuse all others.
  415. The SKU ID is not checked. Like a genuine KMS server vlmcsd
  416. activates a product that has a random or unknown SKU ID. If you
  417. select -K1 or -K3, vlmcsd also checks the Application ID for
  418. correctness. If Microsoft introduces a new KMS ID for a new
  419. product, you cannot activate it if you used -K1 or -K3 until a
  420. new version of vlmcsd is available.
  421. -c0 and -c1
  422. -c1 causes vlmcsd to check if the client time differs no more
  423. than four hours from the system time. -c0 (the default) disables
  424. this check. -c1 is useful to prevent emulator detection. A
  425. client that tries to detect an emulator could simply send two
  426. subsequent request with two time stamps that differ more than
  427. four hours from each other. If both requests succeed, the server
  428. is an emulator. If you specify -c1 on a system with no reliable
  429. time source, activations will fail. It is ok to set the correct
  430. system time after you started vlmcsd.
  431. -M0 and -M1
  432. Disables (-M0) or enables (-M1) maintaining a list of client
  433. machine IDs (CMIDs). The default is -M0. -M1 is useful to pre-
  434. vent emulator detection. By maintaing a CMID list, vlmcsd
  435. reports current active clients exactly like a genuine KMS emula-
  436. tor. This includes bug compatibility to the extent that you can
  437. permanently kill a genuine KMS emulator by sending an "over-
  438. charge request" with a required client count of 376 or more and
  439. then request activation for 671 clients. vlmcsd can be reset
  440. from this condition by restarting it. If -M0 is used, vlmcsd
  441. reports current active clients as good as possible. If no client
  442. sends an "overcharge request", it is not possible to detect vlm-
  443. csd as an emulator with -M0. -M1 requires the allocation of a
  444. buffer that is about 50 kB in size. On hardware with few memory
  445. resources use it only if you really need it.
  446. If you start vlmcsd from an internet superserver, -M1 cannot be
  447. used. Since vlmcsd exits after each activation, it cannot main-
  448. tain any state in memory.
  449. -E0 and -E1
  450. These options are ignored if you do not also specify -M1. If you
  451. use -E0 (the default), vlmcsd starts up as a fully "charged" KMS
  452. server. Clients activate immediately. -E1 lets you start up vlm-
  453. csd with an empty CMID list. Activation will start when the
  454. required minimum clients (25 for Windows Client OSses, 5 for
  455. Windows Server OSses and Office) have registered with the KMS
  456. server. As long as the minimum client count has not been
  457. reached, clients end up in HRESULT 0xC004F038 "The count
  458. reported by your Key Management Service (KMS) is insufficient.
  459. Please contact your system administrator". You may use vlmcs(1)
  460. or another KMS client emulator to "charge" vlmcsd. -E1 does not
  461. improve emulator detection prevention. It's primary purpose is
  462. to help developers of KMS clients to test "charging" a KMS
  463. server.
  464. -R renewal-interval
  465. Instructs clients to renew activation every renewal-interval.
  466. The renewal-interval is a number optionally immediately followed
  467. by a letter indicating the unit. Valid unit letters are s (sec-
  468. onds), m (minutes), h (hours), d (days) and w (weeks). If you do
  469. not specify a letter, minutes is assumed.
  470. -R3d for instance instructs clients to renew activation every 3
  471. days. The default renewal-interval is 10080 (identical to 7d and
  472. 1w).
  473. Due to poor implementation of Microsofts KMS Client it cannot be
  474. guaranteed that activation is renewed on time as specfied by the
  475. -R option. Don't care about that. Renewal will happen well
  476. before your activation expires (usually 180 days).
  477. Even though you can specify seconds, the granularity of this
  478. option is 1 minute. Seconds are rounded down to the next multi-
  479. ple of 60.
  480. -A activation-interval
  481. Instructs clients to retry activation every activation-interval
  482. if it was unsuccessful, e.g. because it could not reach the
  483. server. The default is 120 (identical to 2h). activation-inter-
  484. val follows the same syntax as renewal-interval in the -R
  485. option.
  486. -s Installs vlmcsd as a Windows service. This option only works
  487. with the native Windows version and Cygwin. Combine -s with
  488. other command line options. These will be in effect when you
  489. start the service. The service automatically starts when you
  490. reboot your machine. To start it manually, type "net start vlm-
  491. csd".
  492. If you use Cygwin, you must include your Cygwin system DLL
  493. directory (usually C:\Cygwin\bin or C:\Cygwin64\bin) into the
  494. PATH environment variable or the service will not start.
  495. You can reinstall the service anytime using vlmcsd -s again,
  496. e.g. with a different command line. If the service is running,
  497. it will be restarted with the new command line.
  498. When using -s the command line is checked for basic syntax
  499. errors only. For example "vlmcsd -s -L 1.2.3.4" reports no error
  500. but the service will not start if 1.2.3.4 is not an IP address
  501. on your system.
  502. -S Uninstalls the vlmcsd service. Works only with the native Win-
  503. dows version and Cygwin. All other options will be ignored if
  504. you include -S in the command line.
  505. -U [domain\]username
  506. Can only be used together with -s. Starts the service as a dif-
  507. ferent user than the local SYSTEM account. This is used to run
  508. the service under an account with low privileges. If you omit
  509. the domain, an account from the local computer will be used.
  510. You may use "NT AUTHORITY\NetworkService". This is a pseudo user
  511. with low privileges. You may also use "NT AUTHORITY\LocalSer-
  512. vice" which has more privileges but these are of no use for run-
  513. ning vlmcsd.
  514. Make sure that the user you specify has at least execute permis-
  515. sion for your executable. "NT AUTHORITY\NetworkService" normally
  516. has no permission to run binaries from your home directory.
  517. For your convenience you can use the special username "/l" as a
  518. shortcut for "NT AUTHORITY\LocalService" and "/n" for "NT
  519. AUTHORITY\NetworkService". "vlmcsd -s -U /n" installs the ser-
  520. vice to run as "NT AUTHORITY\NetworkService".
  521. -W password
  522. Can only be used together with -s. Specifies a password for the
  523. corresponding username you use with -U. SYSTEM, "NT AUTHOR-
  524. ITY\NetworkService", "NT AUTHORITY\LocalService" do not require
  525. a password.
  526. If you specify a user with even lower privileges than "NT
  527. AUTHORITY\NetworkService", you must specify its password. You
  528. also have to grant the "Log on as a service" right to that user.
  529. SIGNALS
  530. The following signals differ from the default behavior:
  531. SIGTERM, SIGINT
  532. These signals cause vlmcsd to exit gracefully. All global sema-
  533. phores and shared memory pages will be released, the pid file
  534. will be unlinked (deleted) and a shutdown message will be
  535. logged.
  536. SIGHUP Causes vlmcsd to be restarted completely. This is useful if you
  537. started vlmcsd with an ini file. You can modify the ini file
  538. while vlmcsd is running and then sending SIGHUP, e.g. by typing
  539. "killall -SIGHUP vlmcsd" or "kill -SIGHUP `cat /var/run/vlm-
  540. csd.pid`".
  541. The SIGHUP handler has been implemented relatively simple. It is
  542. virtually the same as stopping vlmcsd and starting it again
  543. immediately with the following exceptions:
  544. -- The new process does not get a new process id.
  545. -- If you used a pid file, it is not deleted and recreated
  546. because the process id stays the same.
  547. -- If you used the 'user' and/or 'group' directive in an ini
  548. file these are ignored. This is because once you switched to
  549. lower privileged users and groups, there is no way back. Any-
  550. thing else would be a severe security flaw in the OS.
  551. Signaling is not available in the native Windows version and in the
  552. Cygwin version when vlmcsd runs as a Windows service.
  553. SUPPORTED OPERATING SYSTEMS
  554. vlmcsd compiles and runs on Linux, Windows (no Cygwin required but
  555. explicitly supported), Mac OS X, FreeBSD, NetBSD, OpenBSD, Dragonfly
  556. BSD, Minix, Solaris, OpenIndiana, Android and iOS. Other POSIX or
  557. unixoid OSses may work with unmodified sources or may require minor
  558. porting efforts.
  559. SUPPORTED PRODUCTS
  560. vlmcsd can answer activation requests for the following products: Win-
  561. dows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 (up to 1703),
  562. Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Win-
  563. dows Server 2012 R2, Windows Server 2016, Office 2010, Project 2010,
  564. Visio 2010, Office 2013, Project 2013, Visio 2013, Office 2016, Project
  565. 2016, Visio 2016. Newer products may work as long as the KMS protocol
  566. does not change. A complete list of fully supported products can be
  567. obtained using the -x option of vlmcs(1).
  568. Office, Project and Visio must be volume license versions.
  569. FILES
  570. vlmcsd.ini(5)
  571. EXAMPLES
  572. vlmcsd -De
  573. Starts vlmcsd in foreground. Useful if you use it for the first
  574. time and want to see what's happening when a client requests
  575. activation.
  576. vlmcsd -l /var/log/vlmcsd.log
  577. Starts vlmcsd as a daemon and logs everything to /var/log/vlm-
  578. csd.log.
  579. vlmcsd -L 192.168.1.17
  580. Starts vlmcsd as a daemon and listens on IP address 192.168.1.17
  581. only. This is useful for routers that have a public and a pri-
  582. vate IP address to prevent your KMS server from becoming public.
  583. vlmcsd -s -U /n -l C:\logs\vlmcsd.log
  584. Installs vlmcsd as a Windows service with low privileges and
  585. logs everything to C:\logs\vlmcsd.log when the service is
  586. started with "net start vlmcsd".
  587. BUGS
  588. An ePID specified in an ini file must not contain spaces.
  589. AUTHOR
  590. Written by crony12, Hotbird64 and vityan666. With contributions from
  591. DougQaid.
  592. CREDITS
  593. Thanks to abbodi1406, CODYQX4, deagles, eIcn, mikmik38, nosferati87,
  594. qad, Ratiborus, ...
  595. SEE ALSO
  596. vlmcsd.ini(5), vlmcsd(7), vlmcs(1), vlmcsdmulti(1)
  597. Hotbird64 October 2018 VLMCSD(8)