README_SLACKWARE 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. *** Running a taskd server under Slackware ***
  2. Table of contents:
  3. * Taskd configuration for Slackware
  4. * Creating a taskd user and data directory
  5. * Initializing the server
  6. * Certificates and clients
  7. * Starting the server
  8. * Cautions and quirks...
  9. See man taskd, /usr/doc/taskd-VERSION/doc/operation.txt
  10. and man task-sync (from task) for full details of
  11. what follows. In particular, read the operation.txt
  12. document for a more complete overview.
  13. Taskd configuration for Slackware
  14. =================================
  15. The taskd server is written to be cross-platform among
  16. Unix-like OSs and leaves many setup and configuration
  17. choices to the user. The provided man pages and text
  18. guides are complete and helpful, but this SlackBuild
  19. script adds a few details to make initial setup easier
  20. on a Slackware system.
  21. The added pieces are:
  22. * Creation of a taskd user and group
  23. * Creation of data directory - /var/lib/taskd
  24. * A global path config file - /etc/taskddata
  25. * Profile scripts - /etc/profile.d/taskddata.{sh,csh}
  26. * A Slackware start script - /etc/rc.d/rc.taskd
  27. If you build and install the package with this script, you
  28. you will end with a complete taskd install just as provided
  29. by the upstream sources. Simply ignore or remove the above
  30. listed files and skip the following config steps, and you
  31. may then configure and run the server according to your own
  32. choices based on man taskd and the distribution docs.
  33. If you continue, the following steps will get your taskd
  34. server running quickly and safely based on the above
  35. listed choices.
  36. Create a taskd user and data directory
  37. ======================================
  38. The server should be run as a non-priviledged user, and
  39. the data paths should be owned by that user and not
  40. accessible by others. You may use any UID/GID you choose,
  41. those guaranteed not to conflict on a Slackware/SBo system
  42. may be found here: http://www.slackbuilds.org/uid_gid.txt
  43. To create the user account and data directory, execute the
  44. following shell commands as root:
  45. groupadd -g 290 taskd
  46. useradd -g taskd -u 290 -d /var/lib/taskd taskd
  47. mkdir -p /var/lib/taskd
  48. chown taskd:taskd /var/lib/taskd
  49. chmod 700 /var/lib/taskd
  50. Initializing the server
  51. =======================
  52. You need to initialize the server as the taskd user,
  53. AND the $TASKDDATA env variable must be set for that user,
  54. so let's verify that first:
  55. su - taskd
  56. echo $TASKDDATA
  57. If the value of $TASKDDATA is not the same as the data path
  58. set above, check the following:
  59. /etc/taskddata - Must export the variable when sourced
  60. /etc/profile.d/taskddata.{sh,csh} - are executable
  61. OR
  62. /etc/profile - includes a line ". /etc/taskddata"
  63. After you verify taskd user correctly sees $TASKDDATA...
  64. taskd init --data $TASKDDATA
  65. taskd config server localhost:53589
  66. Change logs and PIDs from /tmp to data path
  67. taskd config log $TASKDDATA/taskd.log
  68. taskd config pid.file $TASKDDATA/taskd.pid
  69. taskd config ip.log 1
  70. We will allow all connections for now...
  71. taskd config client.allow all
  72. taskd config client.deny none
  73. Certificates and clients
  74. ========================
  75. The server needs a certificate, key and crl to operate.
  76. See operation.txt and man taskd to set up your own certs,
  77. the following uses locally created self-signed certs.
  78. You will need to be root for this...
  79. cd /usr/share/taskd-VERSION/pki
  80. ./generate
  81. Once the various files are created, install them in $TASKDDATA:
  82. cp client.cert.pem $TASKDDATA
  83. cp server.cert.pem $TASKDDATA
  84. cp server.key.pem $TASKDDATA
  85. cp server.crl.pem $TASKDDATA
  86. Configure the server to use them:
  87. taskd config client.cert $TASKDDATA/client.cert.pem
  88. taskd config server.cert $TASKDDATA/server.cert.pem
  89. taskd config server.key $TASKDDATA/server.key.pem
  90. taskd config server.crl $TASKDDATA/server.crl.pem
  91. We are using self-signed certs at this point, so...
  92. cp ca.cert.pem $TASKDDATA
  93. taskd config ca.cert $TASKDDATA/ca.cert.pem
  94. Now you must change ownership of these to taskd in the data
  95. directory:
  96. chown taskd:taskd /var/lib/taskd/*
  97. The resultant client.cert.pem and client.key.pem files
  98. are needed by the clients (see man task-sync from task).
  99. This will get taskd working and is probably sufficient for local
  100. use. You will want to use proper certificates and keys created
  101. per-user for production use. See the accompanying docs for details.
  102. See man taskd for creating and managing organizations, groups and
  103. users on the server.
  104. Starting the server
  105. ===================
  106. To start/stop the taskd server:
  107. chmod +x /etc/rc.d/rc.taskd
  108. /etc/rc.d/rc.taskd start
  109. /etc/rc.d/rc.taskd stop
  110. See comments in /etc/rc.d/rc.taskd to auto-start at boot.
  111. Cautions and quirks...
  112. ======================
  113. Taskd is a new application and is not as mature as the task
  114. client application. Although it has proven to be very stable in
  115. operation, it has a few loose ends still when it comes to
  116. admin of the server. Hopefully these will be cleaned up with
  117. future releases!
  118. A recurring theme in my own use has been that when creating
  119. new organizations and users, I forget to su - taskd first and
  120. perform the operation as root - and it succeeds! But taskd
  121. creates the associated subdirectories and files with root
  122. ownership and the server cannot use them!
  123. Another is when changing server certs, I generate and copy
  124. them in as root - the server will not start afterward.
  125. The fix is easy in both cases...
  126. chown -R taskd:taskd /var/lib/taskd
  127. Just remember to perform all server admin as taskd, and when
  128. something breaks - check ownerships first!
  129. Another quirk is the start script - rc.taskd. I generated this
  130. based on the distribution taskdctl script, so I'll share the
  131. blame! It is not very robust when it encounters errors at startup
  132. and will report "server started" under some conditions where the
  133. server actually failed to start... use man taskd and test from
  134. an su - taskd shell when getting the configs right.
  135. Hopefully the server will catch the client soon in terms of
  136. polish!
  137. Enjoy!