PageRenderTime 79ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/389-ds-base-1.2.11.7/ldap/servers/slapd/tools/ldclt/examples/001/config.ksh

#
Korn Shell | 56 lines | 12 code | 5 blank | 39 comment | 0 complexity | 88ee0012c8651a72e4946f85a2bde709 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0
  1. #!/bin/ksh -p
  2. #ident "ldclt @(#)config.ksh 1.2 01/04/11"
  3. # BEGIN COPYRIGHT BLOCK
  4. # This Program is free software; you can redistribute it and/or modify it under
  5. # the terms of the GNU General Public License as published by the Free Software
  6. # Foundation; version 2 of the License.
  7. #
  8. # This Program is distributed in the hope that it will be useful, but WITHOUT
  9. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  10. # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  11. #
  12. # You should have received a copy of the GNU General Public License along with
  13. # this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
  14. # Place, Suite 330, Boston, MA 02111-1307 USA.
  15. #
  16. # In addition, as a special exception, Red Hat, Inc. gives You the additional
  17. # right to link the code of this Program with code not covered under the GNU
  18. # General Public License ("Non-GPL Code") and to distribute linked combinations
  19. # including the two, subject to the limitations in this paragraph. Non-GPL Code
  20. # permitted under this exception must only link to the code of this Program
  21. # through those well defined interfaces identified in the file named EXCEPTION
  22. # found in the source code files (the "Approved Interfaces"). The files of
  23. # Non-GPL Code may instantiate templates or use macros or inline functions from
  24. # the Approved Interfaces without causing the resulting work to be covered by
  25. # the GNU General Public License. Only Red Hat, Inc. may make changes or
  26. # additions to the list of Approved Interfaces. You must obey the GNU General
  27. # Public License in all respects for all of the Program code and other code used
  28. # in conjunction with the Program except the Non-GPL Code covered by this
  29. # exception. If you modify this file, you may extend this exception to your
  30. # version of the file, but you are not obligated to do so. If you do not wish to
  31. # provide this exception without modification, you must delete this exception
  32. # statement from your version and license this file solely under the GPL without
  33. # exception.
  34. #
  35. #
  36. # Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
  37. # Copyright (C) 2006 Red Hat, Inc.
  38. # All rights reserved.
  39. # END COPYRIGHT BLOCK
  40. . env.ksh
  41. ldapmodify -D"$RootDN" -w"$RootPasswd" -h$Host -p$Port <<-EOD
  42. dn: $UserDN
  43. changetype: add
  44. objectclass: person
  45. sn: test user
  46. userpassword: $UserPassword
  47. dn: $BaseDN
  48. changetype: modify
  49. add : aci
  50. aci: (targetattr = "*") (version 3.0;acl "test user";allow (all)(userdn = "ldap:///$UserDN");)
  51. EOD