turnadmin.1 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. .\" Text automatically generated by txt2man
  2. .TH TURN 1 "20 March 2015" "" ""
  3. .SH GENERAL INFORMATION
  4. \fIturnadmin\fP is a TURN administration tool. This tool can be used to manage
  5. the user accounts (add/remove users, generate
  6. TURN keys for the users). For security reasons, we do not recommend
  7. storing passwords openly. The better option is to use pre\-processed "keys"
  8. which are then used for authentication. These keys are generated by \fIturnadmin\fP.
  9. Turnadmin is a link to \fIturnserver\fP binary, but \fIturnadmin\fP performs different
  10. functions.
  11. .PP
  12. Options note: \fIturnadmin\fP has long and short option names, for most options.
  13. Some options have only long form, some options have only short form. Their syntax
  14. somewhat different, if an argument is required:
  15. .PP
  16. The short form must be used as this (for example):
  17. .PP
  18. .nf
  19. .fam C
  20. $ turnadmin \-u <username> \.\.\.
  21. .fam T
  22. .fi
  23. The long form equivalent must use the "=" character:
  24. .PP
  25. .nf
  26. .fam C
  27. $ turnadmin \-\-user=<username> \.\.\.
  28. .fam T
  29. .fi
  30. If this is a flag option (no argument required) then their usage are the same, for example:
  31. .PP
  32. .nf
  33. .fam C
  34. $ turnadmin \-k \.\.\.
  35. .fam T
  36. .fi
  37. is equivalent to:
  38. .PP
  39. .nf
  40. .fam C
  41. $ turnadmin \-\-key \.\.\.
  42. .fam T
  43. .fi
  44. You have always the use the \fB\-r\fP <realm> option with commands for long term credentials \-
  45. because data for multiple realms can be stored in the same database.
  46. .PP
  47. =====================================
  48. .SS NAME
  49. \fB
  50. \fBturnadmin \fP\- a TURN relay administration tool.
  51. \fB
  52. .SS SYNOPSIS
  53. $ \fIturnadmin\fP [command] [options]
  54. .PP
  55. $ \fIturnadmin\fP [ \fB\-h\fP | \fB\-\-help\fP]
  56. .SS DESCRIPTION
  57. .TP
  58. .B
  59. Commands:
  60. .TP
  61. .B
  62. \fB\-P\fP, \fB\-\-generate\-encrypted\-password\fP
  63. Generate and print to the standard
  64. output an encrypted form of a password (for web admin user, or shared
  65. secret, or CLI). The value then can be used as a safe key for the password
  66. storage on disk or in the database. Every invocation for the same password
  67. produces a different result. The for mat of the encrypted password is:
  68. $5$<\.\.\.salt\.\.\.>$<\.\.\.sha256(salt+password)\.\.\.>. Salt is 16 characters,
  69. the sha256 output is 64 characters. Character 5 is the algorithm id (sha256).
  70. Only sha256 is supported as the hash function.
  71. .TP
  72. .B
  73. \fB\-k\fP, \fB\-\-key\fP
  74. Generate key for a long\-term credentials mechanism user.
  75. .TP
  76. .B
  77. \fB\-a\fP, \fB\-\-add\fP
  78. Add or update a long\-term user.
  79. .TP
  80. .B
  81. \fB\-A\fP, \fB\-\-add\-admin\fP
  82. Add or update an admin user.
  83. .TP
  84. .B
  85. \fB\-d\fP, \fB\-\-delete\fP
  86. Delete a long\-term user.
  87. .TP
  88. .B
  89. \fB\-D\fP, \fB\-\-delete\-admin\fP
  90. Delete an admin user.
  91. .TP
  92. .B
  93. \fB\-l\fP, \fB\-\-list\fP
  94. List long\-term users in the database.
  95. .TP
  96. .B
  97. \fB\-L\fP, \fB\-\-list\-admin\fP
  98. List admin users in the database.
  99. .PP
  100. \fB\-s\fP, \fB\-\-set\-secret\fP=<value> Add shared secret for TURN RESP API
  101. .TP
  102. .B
  103. \fB\-S\fP, \fB\-\-show\-secret\fP
  104. Show stored shared secrets for TURN REST API
  105. .PP
  106. \fB\-X\fP, \fB\-\-delete\-secret\fP=<value> Delete a shared secret.
  107. .RS
  108. .TP
  109. .B
  110. \fB\-\-delete\-all_secrets\fP
  111. Delete all shared secrets for REST API.
  112. .RE
  113. .TP
  114. .B
  115. \fB\-O\fP, \fB\-\-add\-origin\fP
  116. Add origin\-to\-realm relation.
  117. .TP
  118. .B
  119. \fB\-R\fP, \fB\-\-del\-origin\fP
  120. Delete origin\-to\-realm relation.
  121. .TP
  122. .B
  123. \fB\-I\fP, \fB\-\-list\-origins\fP
  124. List origin\-to\-realm relations.
  125. .TP
  126. .B
  127. \fB\-g\fP, \fB\-\-set\-realm\-option\fP
  128. Set realm params: max\-bps, total\-quota, user\-quota.
  129. .TP
  130. .B
  131. \fB\-G\fP, \fB\-\-list\-realm\-options\fP
  132. List realm params.
  133. .TP
  134. .B
  135. Options with required values:
  136. .TP
  137. .B
  138. \fB\-b\fP, \fB\-\-db\fP, \fB\-\-userdb\fP
  139. SQLite user database file name (default \- /var/db/turndb or
  140. /usr/local/var/db/turndb or /var/lib/turn/turndb).
  141. See the same option in the \fIturnserver\fP section.
  142. .TP
  143. .B
  144. \fB\-e\fP, \fB\-\-psql\-userdb\fP
  145. PostgreSQL user database connection string.
  146. See the \fB\-\-psql\-userdb\fP option in the \fIturnserver\fP section.
  147. .TP
  148. .B
  149. \fB\-M\fP, \fB\-\-mysql\-userdb\fP
  150. MySQL user database connection string.
  151. See the \fB\-\-mysql\-userdb\fP option in the \fIturnserver\fP section.
  152. .TP
  153. .B
  154. \fB\-J\fP, \fB\-\-mongo\-userdb\fP
  155. MongoDB user database connection string.
  156. See the \fB\-\-mysql\-mongo\fP option in the \fIturnserver\fP section.
  157. .TP
  158. .B
  159. \fB\-N\fP, \fB\-\-redis\-userdb\fP
  160. Redis user database connection string.
  161. See the \fB\-\-redis\-userdb\fP option in the \fIturnserver\fP section.
  162. .TP
  163. .B
  164. \fB\-u\fP, \fB\-\-user\fP
  165. User name.
  166. .TP
  167. .B
  168. \fB\-r\fP, \fB\-\-realm\fP
  169. Realm.
  170. .TP
  171. .B
  172. \fB\-p\fP, \fB\-\-password\fP
  173. Password.
  174. .TP
  175. .B
  176. \fB\-o\fP, \fB\-\-origin\fP
  177. Origin
  178. .TP
  179. .B
  180. \fB\-H\fP, \fB\-\-sha256\fP
  181. Use SHA256 as the keys hash function (a non\-standard feature).
  182. By default, MD5 is used for the key storage encryption
  183. (as required by the current STUN/TURNstandards).
  184. .TP
  185. .B
  186. \fB\-Y\fP, \fB\-\-sha384\fP
  187. Use SHA384 as the keys hash function (a non\-standard feature).
  188. .TP
  189. .B
  190. \fB\-K\fP, \fB\-\-sha512\fP
  191. Use SHA512 as the keys hash function (a non\-standard feature).
  192. .TP
  193. .B
  194. \fB\-\-max\-bps\fP
  195. Set value of realm's max\-bps parameter.
  196. .TP
  197. .B
  198. \fB\-\-total\-quota\fP
  199. Set value of realm's total\-quota parameter.
  200. .TP
  201. .B
  202. \fB\-\-user\-quota\fP
  203. Set value of realm's user\-quota parameter.
  204. .TP
  205. .B
  206. \fB\-h\fP, \fB\-\-help\fP
  207. Help.
  208. .TP
  209. .B
  210. Command examples:
  211. .PP
  212. Generate an encrypted form of a password:
  213. .PP
  214. $ \fIturnadmin\fP \fB\-P\fP \fB\-p\fP <password>
  215. .PP
  216. Generate a key:
  217. .PP
  218. $ \fIturnadmin\fP \fB\-k\fP \fB\-u\fP <username> \fB\-r\fP <realm> \fB\-p\fP <password>
  219. .PP
  220. Add/update a user in the in the database:
  221. .PP
  222. $ \fIturnadmin\fP \fB\-a\fP [\fB\-b\fP <userdb\-file> | \fB\-e\fP <db\-connection\-string> | \fB\-M\fP <db\-connection\-string> | \fB\-N\fP <db\-connection\-string> ] \fB\-u\fP <username> \fB\-r\fP <realm> \fB\-p\fP <password>
  223. .PP
  224. Delete a user from the database:
  225. .PP
  226. $ \fIturnadmin\fP \fB\-d\fP [\fB\-b\fP <userdb\-file> | \fB\-e\fP <db\-connection\-string> | \fB\-M\fP <db\-connection\-string> | \fB\-N\fP <db\-connection\-string> ] \fB\-u\fP <username> \fB\-r\fP <realm>
  227. .PP
  228. List all long\-term users in MySQL database:
  229. .PP
  230. $ \fIturnadmin\fP \fB\-l\fP \fB\-\-mysql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm>
  231. .PP
  232. List all admin users in Redis database:
  233. .PP
  234. $ \fIturnadmin\fP \fB\-L\fP \fB\-\-redis\-userdb\fP="<db\-connection\-string>"
  235. .PP
  236. Set secret in MySQL database:
  237. .PP
  238. $ \fIturnadmin\fP \fB\-s\fP <secret> \fB\-\-mysql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm>
  239. .PP
  240. Show secret stored in PostgreSQL database:
  241. .PP
  242. $ \fIturnadmin\fP \fB\-S\fP \fB\-\-psql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm>
  243. .PP
  244. Set origin\-to\-realm relation in MySQL database:
  245. .PP
  246. $ \fIturnadmin\fP \fB\-\-mysql\-userdb\fP="<db\-connection\-string>" \fB\-r\fP <realm> \fB\-o\fP <origin>
  247. .PP
  248. Delete origin\-to\-realm relation from Redis DB:
  249. .PP
  250. $ \fIturnadmin\fP \fB\-\-redis\-userdb\fP="<db\-connection\-string>" \fB\-o\fP <origin>
  251. .PP
  252. List all origin\-to\-realm relations in Redis DB:
  253. .PP
  254. $ \fIturnadmin\fP \fB\-\-redis\-userdb\fP="<db\-connection\-string>" \fB\-I\fP
  255. .PP
  256. List the origin\-to\-realm relations in PostgreSQL DB for a single realm:
  257. .PP
  258. $ \fIturnadmin\fP \fB\-\-psql\-userdb\fP="<db\-connection\-string>" \fB\-I\fP \fB\-r\fP <realm>
  259. .TP
  260. .B
  261. Help:
  262. .PP
  263. $ \fIturnadmin\fP \fB\-h\fP
  264. .PP
  265. =======================================
  266. .SS DOCS
  267. After installation, run the command:
  268. .PP
  269. $ man \fIturnadmin\fP
  270. .PP
  271. or in the project root directory:
  272. .PP
  273. $ man \fB\-M\fP man \fIturnadmin\fP
  274. .PP
  275. to see the man page.
  276. .PP
  277. =====================================
  278. .SS FILES
  279. /etc/turnserver.conf
  280. .PP
  281. /var/db/turndb
  282. .PP
  283. /usr/local/var/db/turndb
  284. .PP
  285. /var/lib/turn/turndb
  286. .PP
  287. /usr/local/etc/turnserver.conf
  288. .PP
  289. =====================================
  290. .SS DIRECTORIES
  291. /usr/local/share/\fIturnserver\fP
  292. .PP
  293. /usr/local/share/doc/\fIturnserver\fP
  294. .PP
  295. /usr/local/share/examples/\fIturnserver\fP
  296. .PP
  297. ======================================
  298. .SS SEE ALSO
  299. \fIturnserver\fP, \fIturnutils\fP
  300. .RE
  301. .PP
  302. ======================================
  303. .SS WEB RESOURCES
  304. project page:
  305. .PP
  306. http://code.google.com/p/coturn/
  307. .PP
  308. Wiki page:
  309. .PP
  310. http://code.google.com/p/coturn/wiki/Readme
  311. .PP
  312. forum:
  313. .PP
  314. https://groups.google.com/forum/?fromgroups=#!forum/turn\-server\-project\-rfc5766\-turn\-server/
  315. .RE
  316. .PP
  317. ======================================
  318. .SS AUTHORS
  319. Oleg Moskalenko <[email protected]>
  320. .PP
  321. Gabor Kovesdan http://kovesdan.org/
  322. .PP
  323. Daniel Pocock http://danielpocock.com/
  324. .PP
  325. John Selbie ([email protected])
  326. .PP
  327. Lee Sylvester <[email protected]>
  328. .PP
  329. Erik Johnston <[email protected]>
  330. .PP
  331. Roman Lisagor <[email protected]>
  332. .PP
  333. Vladimir Tsanev <[email protected]>
  334. .PP
  335. Po\-sheng Lin <[email protected]>
  336. .PP
  337. Peter Dunkley <[email protected]>
  338. .PP
  339. Mutsutoshi Yoshimoto <[email protected]>
  340. .PP
  341. Federico Pinna <[email protected]>
  342. .PP
  343. Bradley T. Hughes <[email protected]>