maintenance_commands.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <title>
  7. GnuDIP User Maintenance Commands
  8. </title>
  9. <base target="_blank">
  10. </head>
  11. <body bgcolor=white>
  12. <table><tr valign=middle><td>
  13. <img align=middle src="gnudip/html/gnudip.jpg" alt="GnuDIP Logo" border=0 height=60 width=113>
  14. </td><td>
  15. <h1>GnuDIP User Maintenance Commands</h1>
  16. </table>
  17. <hr>
  18. <p>
  19. Here we describe four line mode commands that may used to do user maintenance
  20. from the command line, or from a script (e.g. PHP).
  21. <p><hr>
  22. <p>
  23. Here is the "help" for these commands:
  24. <blockquote>
  25. <pre>
  26. # gdipuseradd.pl -h
  27. usage: gdipuseradd.pl { -h | [-p password] [-m email] user domain }
  28. usage: Add GnuDIP user "user" within domain "domain" with
  29. usage: password "password" and (optionally) E-mail address "email".
  30. usage: -h: Print this usage message.
  31. usage: -p: Specify clear text password. The stored password will the MD5
  32. usage: hash of this value. Password is disabled if not specified.
  33. usage: -m: Specify E-mail address.
  34. </pre>
  35. <p>
  36. <pre>
  37. # gdipusermod.pl -h
  38. usage: gdipusermod.pl { -h |
  39. usage: [-m email] [-p password] [-x rawpassword]
  40. usage: [-w {YES|NO}] [-y {YES|NO}] [-r]
  41. usage: user domain }
  42. usage: Modify GnuDIP user "user" within domain "domain".
  43. usage: -h: Print this usage message.
  44. usage: -m: Specify E-mail address.
  45. usage: -p: Specify clear text password. The stored password will
  46. usage: the MD5 hash of this value.
  47. usage: -x: Specify the hashed password. This will be stored as
  48. usage: password hash value without any change.
  49. usage: -w: Allow ("YES") or disallow ("NO") wild cards.
  50. usage: -y: Allow ("YES") or disallow ("NO") MX records.
  51. usage: -r: Remove all DNS information.
  52. </pre>
  53. <p>
  54. <pre>
  55. # gdipuserdel.pl -h
  56. usage: gdipuserdel.pl { -h | user domain }
  57. usage: Delete GnuDIP user "user" within domain "domain".
  58. usage: -h: Print this usage message.
  59. </pre>
  60. <p>
  61. <pre>
  62. # gdipuserget.pl -h
  63. usage: gdipuserget.pl { -h | user domain }
  64. usage: Display GnuDIP user "user" within domain "domain".
  65. usage: -h: Print this usage message.
  66. </pre>
  67. </blockquote>
  68. <p>
  69. Here is a demonstration of their use:
  70. <blockquote>
  71. <pre>
  72. # gdipuseradd.pl -p testpass -m rob@demo.com rob dyn.yourhost.com
  73. Added user "rob.dyn.yourhost.com"
  74. </pre>
  75. </blockquote>
  76. <p>
  77. After logging in as "rob.dyn.yourhost.com" and setting the IP address:
  78. <blockquote>
  79. <pre>
  80. # ping rob.dyn.yourhost.com
  81. PING rob.dyn.yourhost.com (127.0.0.1): 56 octets data
  82. 64 octets from 127.0.0.1: icmp_seq=0 ttl=255 time=0.2 ms
  83. 64 octets from 127.0.0.1: icmp_seq=1 ttl=255 time=0.1 ms
  84. --- rob.dyn.yourhost.com ping statistics ---
  85. 2 packets transmitted, 2 packets received, 0% packet loss
  86. round-trip min/avg/max = 0.1/0.1/0.2 ms
  87. </pre>
  88. <p>
  89. <pre>
  90. # gdipuserget.pl rob dyn.yourhost.com
  91. Retrieved user "rob.dyn.yourhost.com"
  92. MXbackup = NO
  93. wildcard = NO
  94. password = 179ad45c6ce2cb97cf1029e212046e81
  95. forwardurl =
  96. allowmx = NO
  97. MXvalue =
  98. autourlon =
  99. level = USER
  100. currentip = 127.0.0.1
  101. username = rob
  102. allowwild = NO
  103. updated = 2002-05-24 20:43:01
  104. domain = dyn.yourhost.com
  105. email = rob@demo.com
  106. </pre>
  107. <p>
  108. <pre>
  109. # gdipusermod.pl -m dummy@yourhost.com rob dyn.yourhost.com
  110. Updated user "rob.dyn.yourhost.com"
  111. </pre>
  112. <p>
  113. <pre>
  114. # gdipuserget.pl rob dyn.yourhost.com
  115. Retrieved user "rob.dyn.yourhost.com"
  116. MXbackup = NO
  117. wildcard = NO
  118. password =
  119. forwardurl =
  120. allowmx = NO
  121. MXvalue =
  122. autourlon =
  123. level = USER
  124. currentip = 127.0.0.1
  125. username = rob
  126. allowwild = NO
  127. updated = 2002-05-24 20:44:15
  128. domain = dyn.yourhost.com
  129. email = dummy@yourhost.com
  130. </pre>
  131. <p>
  132. <pre>
  133. # gdipuserdel.pl rob dyn.yourhost.com
  134. User "rob.dyn.yourhost.com" has been deleted and removed from DNS
  135. </pre>
  136. <p>
  137. <pre>
  138. # ping rob.dyn.yourhost.com
  139. ping: unknown host rob.dyn.yourhost.com
  140. </pre>
  141. </blockquote>
  142. <p>
  143. The "parameter = value" lines printed by <code>gdipuserget.pl</code> go to
  144. standard output. All of the other messages from these commands go to standard
  145. error.
  146. <p>
  147. The return codes are:
  148. <ul>
  149. <li>0 - Success
  150. <li>1 - User not found or already exists, as appropriate
  151. <li>2 - User error or configuration error - message(s) issued
  152. </ul>
  153. <p>
  154. The commands must be run under a user ID that can read the
  155. <a href="gnudip/etc/gnudip.conf"><code>gnudip.conf</code></a> file.
  156. <p><hr>
  157. </body>
  158. </html>