radum 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/LICENSE +1 -1
- data/lib/radum.rb +12 -2
- data/lib/radum/ad.rb +28 -15
- metadata +42 -15
data/LICENSE
CHANGED
data/lib/radum.rb
CHANGED
@@ -1,6 +1,16 @@
|
|
1
|
-
|
1
|
+
# Ruby 1.9.x requirements.
|
2
|
+
if RUBY_VERSION =~ /^1.9/
|
3
|
+
# The net-ldap gem uses String#to_a. In Ruby 1.9.x this needs to be
|
4
|
+
# String.lines.to_a, but I have to monkey patch this in for things to work.
|
5
|
+
class String
|
6
|
+
def to_a
|
7
|
+
self.lines.to_a
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
2
11
|
|
3
|
-
|
12
|
+
require 'yaml'
|
13
|
+
gem 'net-ldap', '= 0.1.1'
|
4
14
|
require 'net/ldap'
|
5
15
|
|
6
16
|
require 'radum/logger'
|
data/lib/radum/ad.rb
CHANGED
@@ -13,7 +13,11 @@
|
|
13
13
|
# and Linux in addition to Windows. RADUM does require the Active Directory
|
14
14
|
# server to support SSL because that is a requirement for creating user
|
15
15
|
# accounts through LDAP. This means that a domain must have a certificate
|
16
|
-
# server. Using a self-signed certificate should be fine.
|
16
|
+
# server. Using a self-signed certificate should be fine. It might also
|
17
|
+
# be necessary to install the Certificate Authority Web Enrollment role
|
18
|
+
# service. This is required when running RADUM from Mac OS X Snow Leopard
|
19
|
+
# because the ocspd OCSP and CRL daemon will try to contact the Active
|
20
|
+
# Directory server.
|
17
21
|
#
|
18
22
|
# RADUM considers its view of user and group attributes to be authoritative,
|
19
23
|
# with the exception that it will not modify the members of a group that it
|
@@ -355,16 +359,17 @@
|
|
355
359
|
#
|
356
360
|
# = Windows Server Versions
|
357
361
|
#
|
358
|
-
# RADUM has been
|
359
|
-
# Server 2003 R2 Standard Edition SP2. The testing
|
360
|
-
# Identity Management for UNIX installed and had the Certificate
|
361
|
-
# added, which is added using Add/Remove Programs in Windows
|
362
|
-
# Microsoft Identity Management for UNIX is generally required
|
363
|
-
# UNIXUser and UNIXGroup objects in the Active Directory Users
|
364
|
-
# GUI tool if desired, and the Certificate Services Role is
|
365
|
-
# domain because SSL is required for creating User and
|
366
|
-
# LDAP. The LDAP attributes required for UNIXUser
|
367
|
-
# require Microsoft Identity Management for UNIX
|
362
|
+
# RADUM has been tested against Windows Server 2008 R2, Windows Server 2008,
|
363
|
+
# and Windows Server 2003 R2 Standard Edition SP2. The testing systems had
|
364
|
+
# Microsoft Identity Management for UNIX installed and had the Certificate
|
365
|
+
# Services Role added, which is added using Add/Remove Programs in Windows
|
366
|
+
# Server 2003. Microsoft Identity Management for UNIX is generally required
|
367
|
+
# for editing UNIXUser and UNIXGroup objects in the Active Directory Users
|
368
|
+
# and Computers GUI tool if desired, and the Certificate Services Role is
|
369
|
+
# required in the domain because SSL is required for creating User and
|
370
|
+
# UNIXUser objects using LDAP. The LDAP attributes required for UNIXUser
|
371
|
+
# objects don't necessarily require Microsoft Identity Management for UNIX
|
372
|
+
# to be installed.
|
368
373
|
#
|
369
374
|
# RADUM works with a domain functional level of Windows 2003 Server or higher.
|
370
375
|
# Most of RADUM will work with a domain functional level of Windows 2000 native
|
@@ -375,15 +380,23 @@
|
|
375
380
|
# than Windows Server 2003. RADUM was not tested at a domain functional level
|
376
381
|
# lower than Windows 2000 native.
|
377
382
|
#
|
383
|
+
# = Ruby 1.9 Support
|
384
|
+
#
|
385
|
+
# RADUM now works with Ruby 1.9 and has been tested with Ruby 1.8.7, JRuby
|
386
|
+
# 1.5.6, and Ruby 1.9.2. Ruby 1.9 users should note that RADUM adds the
|
387
|
+
# String#to_a method back to the String class. This is necessary so that
|
388
|
+
# net-ldap 0.1.1 works with Ruby 1.9. This will be removed as soon as
|
389
|
+
# possible.
|
390
|
+
#
|
378
391
|
# Author:: Shaun Rowland <mailto:rowand@shaunrowland.com>
|
379
|
-
# Copyright:: Copyright
|
392
|
+
# Copyright:: Copyright 2011 Shaun Rowland. All rights reserved.
|
380
393
|
# License:: BSD License included in the project LICENSE file.
|
381
394
|
|
382
395
|
module RADUM
|
383
396
|
# Group type constants.
|
384
397
|
#
|
385
398
|
# These are the Fixnum representations of what should be Bignum objects in
|
386
|
-
# some cases as far as I am aware. In the Active Directory Users and
|
399
|
+
# some cases as far as I am aware. In the Active Directory Users and Computers
|
387
400
|
# GUI tool, they are shown as hexidecimal values, indicating they should be
|
388
401
|
# Bignums (well, some of them). However, if you try to edit the values in
|
389
402
|
# that tool (with advanced attribute editing enabled or with the ADSI Edit
|
@@ -918,7 +931,7 @@ module RADUM
|
|
918
931
|
|
919
932
|
# Make sure we are working with a User object only.
|
920
933
|
unless user.instance_of?(User)
|
921
|
-
raise ":user argument
|
934
|
+
raise ":user argument must be a User object."
|
922
935
|
end
|
923
936
|
|
924
937
|
if user.removed?
|
@@ -1047,7 +1060,7 @@ module RADUM
|
|
1047
1060
|
|
1048
1061
|
# Make sure we are working with a UNIXUser object only.
|
1049
1062
|
unless user.instance_of?(UNIXUser)
|
1050
|
-
raise ":user argument
|
1063
|
+
raise ":user argument must be a UNIXUser object."
|
1051
1064
|
end
|
1052
1065
|
|
1053
1066
|
if user.removed?
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 25
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Shaun Rowland
|
@@ -9,19 +15,25 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-01-08 00:00:00 -05:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
name: net-ldap
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - "="
|
22
28
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
29
|
+
hash: 25
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
- 1
|
33
|
+
- 1
|
34
|
+
version: 0.1.1
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
25
37
|
description: " RADUM is a module to manage users and groups in Active Directory uisng pure\n Ruby on any supported platform.\n"
|
26
38
|
email:
|
27
39
|
- rowland@shaunrowland.com
|
@@ -39,6 +51,11 @@ files:
|
|
39
51
|
- lib/radum/user.rb
|
40
52
|
- lib/radum.rb
|
41
53
|
- LICENSE
|
54
|
+
- test/tc_ad.rb
|
55
|
+
- test/tc_container.rb
|
56
|
+
- test/tc_group.rb
|
57
|
+
- test/tc_unix_user.rb
|
58
|
+
- test/tc_user.rb
|
42
59
|
has_rdoc: true
|
43
60
|
homepage: http://www.shaunrowland.com/wiki/RADUM
|
44
61
|
licenses: []
|
@@ -53,10 +70,12 @@ rdoc_options:
|
|
53
70
|
- radum-gemspec.rb
|
54
71
|
- --exclude
|
55
72
|
- lib/radum.rb
|
73
|
+
- --exclude
|
74
|
+
- Makefile
|
75
|
+
- --exclude
|
76
|
+
- Notes.txt
|
56
77
|
- --main
|
57
78
|
- RADUM
|
58
|
-
- --accessor
|
59
|
-
- directory
|
60
79
|
- --title
|
61
80
|
- RADUM -- Ruby Active Directory User Management
|
62
81
|
- --line-numbers
|
@@ -65,21 +84,29 @@ rdoc_options:
|
|
65
84
|
require_paths:
|
66
85
|
- lib
|
67
86
|
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
none: false
|
68
88
|
requirements:
|
69
|
-
- -
|
89
|
+
- - ">="
|
70
90
|
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
|
91
|
+
hash: 57
|
92
|
+
segments:
|
93
|
+
- 1
|
94
|
+
- 8
|
95
|
+
- 7
|
96
|
+
version: 1.8.7
|
73
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
|
+
none: false
|
74
99
|
requirements:
|
75
100
|
- - ">="
|
76
101
|
- !ruby/object:Gem::Version
|
102
|
+
hash: 3
|
103
|
+
segments:
|
104
|
+
- 0
|
77
105
|
version: "0"
|
78
|
-
version:
|
79
106
|
requirements: []
|
80
107
|
|
81
108
|
rubyforge_project: radum
|
82
|
-
rubygems_version: 1.3.
|
109
|
+
rubygems_version: 1.3.7
|
83
110
|
signing_key:
|
84
111
|
specification_version: 3
|
85
112
|
summary: Manage users and groups in Active Directory.
|