sys-admin 1.6.4 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11ff07c63305a225768e24fd1dc0747f680f15f3
4
- data.tar.gz: 37c72a843fc83396347f6f30e94f55b8f7c8163e
3
+ metadata.gz: 99eafdabb409a5f068337908f24ff54f7ec71c1b
4
+ data.tar.gz: 4596acd0951f39bdb26a8a9c24319a35a5f52ecc
5
5
  SHA512:
6
- metadata.gz: 14c0cdcfda935f10ef5670d853ab03a358b66986122d452e65dcfaf8ceedf0e0d44633824a83f0e04a4e485ad0bb5dd2c7fab4c4427ad740d5548d72ba966e0a
7
- data.tar.gz: 86bac88fe951f77ce10f72d832dcdbba4e629a38038f03516ec94c7faa891f5304a3f4ba44760d0210fe0933d146b09abd7a1cb705d8d40e573f083c0f01255f
6
+ metadata.gz: 84af367e19c13a4e1ee0e1f1cc716f6fdb744d2d870207b1848333649d44a2ced3dd302acab2c5939c38343a50c74005cf89fba038326408914d69349d10aaba
7
+ data.tar.gz: 6a5c585230206ca94a8350a26c12ed0a0bef38e3de96dc2d62fd0873bfe4a8583c7945d1f70e3670324659aa51e0c651e4a5eb5a38be692780de25aa9de37b8e
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,161 +1,168 @@
1
- == 1.6.4 - 6-Sep-2015
2
- * Added a sys-admin.rb file for convenience.
3
- * Set VERSION in a single place.
4
- * Assume Rubygems 2.x for Rakefile tasks.
5
- * This gem is now signed.
6
-
7
- == 1.6.3 - 8-Mar-2014
8
- * The Admin#get_group method now handles groups with very large numbers
9
- of members more robustly.
10
-
11
- == 1.6.2 - 11-Feb-2014
12
- * The User#gid method is now supported on MS Windows. It returns the user's
13
- primary group ID.
14
-
15
- == 1.6.1 - 24-Jan-2014
16
- * Added the Admin.add_group_member and Admin.remove_group member methods. These
17
- let you add a user to a specific group. Thanks go to Alexey Kolyanov for the
18
- idea and the code.
19
- * Modified the Admin.configure_user method so that you don't need to know the
20
- old password. Just pass a single string argument for the new password.
21
- * Fixed a potential encoding issue for the Admin.get_login method on JRuby.
22
- * Updated the gem:create task in the Rakefile.
23
- * Added rake as a development dependency.
24
-
25
- == 1.6.0 - 5-Jan-2013
26
- * Converted code to use FFI. This mostly only affects the unix flavors.
27
- * The Admin.users and Admin.groups methods no longer accept a block.
28
- * Some test suite updates.
29
- * Because all code is now pure Ruby, there is longer any need for two
30
- separate gems. There is now a single, unified gem that works on all
31
- supported platforms.
32
-
33
- == 1.5.6 - 30-Jul-2011
34
- * Fixed issue for non-gnu platforms where it would use the wrong function
35
- prototype because the Ruby core team took it upon themselves to explicitly
36
- defined _GNU_SOURCE in config.h in 1.8.7 and later for reasons that baffle me.
37
- * Some tests on Windows are now skipped unless run with elevated security.
38
-
39
- == 1.5.5 - 5-Jul-2011
40
- * Modified lastlog handling, and ignore getpwent_r and getgrent_r, on AIX.
41
- Thanks go to Rick Ohnemus for the spot and patches.
42
- * Explicitly set spec.cpu on Windows to 'universal' in the gem creation task.
43
- * Fixed a bug in the User.get_login and User.get_group methods where the query
44
- being generated was incorrect if no options were passed. Thanks go to
45
- Matthew Brown for the spot.
46
-
47
- == 1.5.4 - 7-Oct-2010
48
- * Prefer the getlastlogx() function over lastlog() where supported.
49
-
50
- == 1.5.3 - 6-Oct-2010
51
- * Refactored the Rakefile. The old installation tasks have been replaced
52
- with gem build and install tasks. In addition, the platform handling has
53
- been updated for MS Windows.
54
- * Portions of the gemspec have been moved into the Rakefile gem tasks.
55
- * Deploying the mingw gem by default for MS Windows now.
56
-
57
- == 1.5.2 - 2-Aug-2009
58
- * Now compatible with Ruby 1.9.x.
59
- * Added test-unit as a development dependency.
60
-
61
- == 1.5.1 - 23-Jul-2009
62
- * Added the User#dir attribute. This attribute contains a user's home
63
- directory if set, or nil if it isn't.
64
- * User objects returned by the Admin.users method now include the uid.
65
- Previously only the Admin.get_user method set it.
66
- * Added win32-security as a dependency.
67
- * Changed license to Artistic 2.0.
68
-
69
- == 1.5.0 - 29-Mar-2009
70
- * INTERFACE CHANGE (WINDOWS ONLY): The interface for MS Windows has undergone
71
- a radical change. Most methods now accept a hash of options that are
72
- passed directly to the underlying WMI class. Please see the documentation
73
- for details.
74
- * Now works on various BSD flavors.
75
- * Added the User#groups method. This returns an array of groups that the
76
- user belongs to. Suggestion inspired by Gonzalo Garramuno.
77
- * Added the Group#members method. The returns an array of users that the
78
- group contains.
79
- * Changed User#class to User#access_class for UNIX flavors to avoid
80
- conflicts with the Ruby core Object method.
81
- * Added more tests and renamed the test files.
82
- * Removed an unnecessary function call where a platform might try to
83
- get lastlog information even if the lastlog.h or utmp.h headers couldn't
84
- be found.
85
-
86
- == 1.4.4 - 19-Nov-2008
87
- * Added the User#uid method for MS Windows (which is just the user's relative
88
- identifier).
89
- * Now requires test-unit 2.x.
90
- * Some updates to the test suite to take advantage of test-unit 2.x features.
91
- * Some minor gemspec tweaks.
92
-
93
- == 1.4.3 - 2-Mar-2008
94
- * The block form of Admin.users now properly ensures that endpwent() is
95
- called. Likewise, the block form of Admin.groups now properly ensures
96
- that endgrent() is called. This would only have been an issue if you
97
- broke out of the block before it terminated.
98
- * The AdminError class is now Admin::Error.
99
- * Some internal directory layout changes.
100
-
101
- == 1.4.2 - 26-Jun-2007
102
- * Fixed a bug in the Admin.get_login method where it would return junk
103
- if the underlying getlogin() function failed (Unix). Thanks go to Gonzalo
104
- Garramuno for the spot. This bug also resulted in some refactoring of the
105
- underlying C code.
106
- * Removed the install.rb file. The logic in that file has been moved directly
107
- into the Rakefile.
108
-
109
- == 1.4.1 - 21-Mar-2007
110
- * Bug fix for OS X. Thanks go to an anonymous user for the spot.
111
- * Added a Rakefile. Building, testing and installing should now use the
112
- Rake tasks (for non-gem installs).
113
- * Much more inline documentation, especially for User and Group attributes.
114
-
115
- == 1.4.0 - 20-Jan-2007
116
- * Added the following methods: add_local_user, config_local_user,
117
- delete_local_user, add_global_group, config_global_group, and
118
- delete_global_group. MS Windows only at the moment.
119
- * Added corresponding tests.
120
- * Added much more inline documentation.
121
- * Major refactoring of the get_lastlog_info helper function in admin.h. This
122
- fixed a major bug in some flavors of Linux where the Admin.users method
123
- could go into an infinite loop. It also fixed some minor bugs where console
124
- and host values were sometimes filled with junk characters.
125
- * Added the User#change attribute, and a check for the pw_change struct member
126
- in the extconf.rb file.
127
- * The User#expire attribute is now handled as a Time object instead of an
128
- integer.
129
- * Renamed tc_win32.rb to tc_windows.rb
130
-
131
- == 1.3.1 - 29-Jun-2005
132
- * Fixed a bug where the inability to read the lastlog file caused an error.
133
- From now on that error is ignored, and the lastlog attributes of the User
134
- object are set to nil.
135
- * Added a beta version of Admin.delete_user (Windows only).
136
-
137
- == 1.3.0 - 3-Jun-2005
138
- * Bug fixes for Linux.
139
- * Removed the version.h file - no longer needed since the Win32 version is
140
- pure Ruby.
141
-
142
- == 1.2.0 - 30-Apr-2005
143
- * Replaced the Win32 version with a pure Ruby version that uses Win32API and
144
- win32ole + WMI.
145
- * The LocalGroup class no longer exists in the Win32 version. Instead, it is
146
- now an attribute of a Group object. The issue was forced by WMI.
147
- * The default for users and groups on Win32 systems is now local rather than
148
- global. See the documentation for why you probably don't want to iterate
149
- over global accounts.
150
- * Corresponding doc changes and test suite changes.
151
-
152
- == 1.1.0 - 1-Apr-2005
153
- * Fixed bug where a segfault could occur when trying to retrieve a user or
154
- group by an ID that didn't exist (Unix).
155
- * Added tests for intentional failures.
156
- * Added lastlog information tothe User class (Unix).
157
- * Modified the way User objects are created internally (Unix).
158
- * Fixed a bug in the User#shell attribute (Unix).
159
-
160
- == 1.0.0 - 25-Mar-2005
161
- * Initial release
1
+ == 1.7.0 - 21-Feb-2018
2
+ * Changed the license to Apache 2.0.
3
+ * VERSION constant is now frozen.
4
+ * Ignore dependency warnings in gem:create task.
5
+ * Minor README updates.
6
+ * Updated cert.
7
+
8
+ == 1.6.4 - 6-Sep-2015
9
+ * Added a sys-admin.rb file for convenience.
10
+ * Set VERSION in a single place.
11
+ * Assume Rubygems 2.x for Rakefile tasks.
12
+ * This gem is now signed.
13
+
14
+ == 1.6.3 - 8-Mar-2014
15
+ * The Admin#get_group method now handles groups with very large numbers
16
+ of members more robustly.
17
+
18
+ == 1.6.2 - 11-Feb-2014
19
+ * The User#gid method is now supported on MS Windows. It returns the user's
20
+ primary group ID.
21
+
22
+ == 1.6.1 - 24-Jan-2014
23
+ * Added the Admin.add_group_member and Admin.remove_group member methods. These
24
+ let you add a user to a specific group. Thanks go to Alexey Kolyanov for the
25
+ idea and the code.
26
+ * Modified the Admin.configure_user method so that you don't need to know the
27
+ old password. Just pass a single string argument for the new password.
28
+ * Fixed a potential encoding issue for the Admin.get_login method on JRuby.
29
+ * Updated the gem:create task in the Rakefile.
30
+ * Added rake as a development dependency.
31
+
32
+ == 1.6.0 - 5-Jan-2013
33
+ * Converted code to use FFI. This mostly only affects the unix flavors.
34
+ * The Admin.users and Admin.groups methods no longer accept a block.
35
+ * Some test suite updates.
36
+ * Because all code is now pure Ruby, there is longer any need for two
37
+ separate gems. There is now a single, unified gem that works on all
38
+ supported platforms.
39
+
40
+ == 1.5.6 - 30-Jul-2011
41
+ * Fixed issue for non-gnu platforms where it would use the wrong function
42
+ prototype because the Ruby core team took it upon themselves to explicitly
43
+ defined _GNU_SOURCE in config.h in 1.8.7 and later for reasons that baffle me.
44
+ * Some tests on Windows are now skipped unless run with elevated security.
45
+
46
+ == 1.5.5 - 5-Jul-2011
47
+ * Modified lastlog handling, and ignore getpwent_r and getgrent_r, on AIX.
48
+ Thanks go to Rick Ohnemus for the spot and patches.
49
+ * Explicitly set spec.cpu on Windows to 'universal' in the gem creation task.
50
+ * Fixed a bug in the User.get_login and User.get_group methods where the query
51
+ being generated was incorrect if no options were passed. Thanks go to
52
+ Matthew Brown for the spot.
53
+
54
+ == 1.5.4 - 7-Oct-2010
55
+ * Prefer the getlastlogx() function over lastlog() where supported.
56
+
57
+ == 1.5.3 - 6-Oct-2010
58
+ * Refactored the Rakefile. The old installation tasks have been replaced
59
+ with gem build and install tasks. In addition, the platform handling has
60
+ been updated for MS Windows.
61
+ * Portions of the gemspec have been moved into the Rakefile gem tasks.
62
+ * Deploying the mingw gem by default for MS Windows now.
63
+
64
+ == 1.5.2 - 2-Aug-2009
65
+ * Now compatible with Ruby 1.9.x.
66
+ * Added test-unit as a development dependency.
67
+
68
+ == 1.5.1 - 23-Jul-2009
69
+ * Added the User#dir attribute. This attribute contains a user's home
70
+ directory if set, or nil if it isn't.
71
+ * User objects returned by the Admin.users method now include the uid.
72
+ Previously only the Admin.get_user method set it.
73
+ * Added win32-security as a dependency.
74
+ * Changed license to Artistic 2.0.
75
+
76
+ == 1.5.0 - 29-Mar-2009
77
+ * INTERFACE CHANGE (WINDOWS ONLY): The interface for MS Windows has undergone
78
+ a radical change. Most methods now accept a hash of options that are
79
+ passed directly to the underlying WMI class. Please see the documentation
80
+ for details.
81
+ * Now works on various BSD flavors.
82
+ * Added the User#groups method. This returns an array of groups that the
83
+ user belongs to. Suggestion inspired by Gonzalo Garramuno.
84
+ * Added the Group#members method. The returns an array of users that the
85
+ group contains.
86
+ * Changed User#class to User#access_class for UNIX flavors to avoid
87
+ conflicts with the Ruby core Object method.
88
+ * Added more tests and renamed the test files.
89
+ * Removed an unnecessary function call where a platform might try to
90
+ get lastlog information even if the lastlog.h or utmp.h headers couldn't
91
+ be found.
92
+
93
+ == 1.4.4 - 19-Nov-2008
94
+ * Added the User#uid method for MS Windows (which is just the user's relative
95
+ identifier).
96
+ * Now requires test-unit 2.x.
97
+ * Some updates to the test suite to take advantage of test-unit 2.x features.
98
+ * Some minor gemspec tweaks.
99
+
100
+ == 1.4.3 - 2-Mar-2008
101
+ * The block form of Admin.users now properly ensures that endpwent() is
102
+ called. Likewise, the block form of Admin.groups now properly ensures
103
+ that endgrent() is called. This would only have been an issue if you
104
+ broke out of the block before it terminated.
105
+ * The AdminError class is now Admin::Error.
106
+ * Some internal directory layout changes.
107
+
108
+ == 1.4.2 - 26-Jun-2007
109
+ * Fixed a bug in the Admin.get_login method where it would return junk
110
+ if the underlying getlogin() function failed (Unix). Thanks go to Gonzalo
111
+ Garramuno for the spot. This bug also resulted in some refactoring of the
112
+ underlying C code.
113
+ * Removed the install.rb file. The logic in that file has been moved directly
114
+ into the Rakefile.
115
+
116
+ == 1.4.1 - 21-Mar-2007
117
+ * Bug fix for OS X. Thanks go to an anonymous user for the spot.
118
+ * Added a Rakefile. Building, testing and installing should now use the
119
+ Rake tasks (for non-gem installs).
120
+ * Much more inline documentation, especially for User and Group attributes.
121
+
122
+ == 1.4.0 - 20-Jan-2007
123
+ * Added the following methods: add_local_user, config_local_user,
124
+ delete_local_user, add_global_group, config_global_group, and
125
+ delete_global_group. MS Windows only at the moment.
126
+ * Added corresponding tests.
127
+ * Added much more inline documentation.
128
+ * Major refactoring of the get_lastlog_info helper function in admin.h. This
129
+ fixed a major bug in some flavors of Linux where the Admin.users method
130
+ could go into an infinite loop. It also fixed some minor bugs where console
131
+ and host values were sometimes filled with junk characters.
132
+ * Added the User#change attribute, and a check for the pw_change struct member
133
+ in the extconf.rb file.
134
+ * The User#expire attribute is now handled as a Time object instead of an
135
+ integer.
136
+ * Renamed tc_win32.rb to tc_windows.rb
137
+
138
+ == 1.3.1 - 29-Jun-2005
139
+ * Fixed a bug where the inability to read the lastlog file caused an error.
140
+ From now on that error is ignored, and the lastlog attributes of the User
141
+ object are set to nil.
142
+ * Added a beta version of Admin.delete_user (Windows only).
143
+
144
+ == 1.3.0 - 3-Jun-2005
145
+ * Bug fixes for Linux.
146
+ * Removed the version.h file - no longer needed since the Win32 version is
147
+ pure Ruby.
148
+
149
+ == 1.2.0 - 30-Apr-2005
150
+ * Replaced the Win32 version with a pure Ruby version that uses Win32API and
151
+ win32ole + WMI.
152
+ * The LocalGroup class no longer exists in the Win32 version. Instead, it is
153
+ now an attribute of a Group object. The issue was forced by WMI.
154
+ * The default for users and groups on Win32 systems is now local rather than
155
+ global. See the documentation for why you probably don't want to iterate
156
+ over global accounts.
157
+ * Corresponding doc changes and test suite changes.
158
+
159
+ == 1.1.0 - 1-Apr-2005
160
+ * Fixed bug where a segfault could occur when trying to retrieve a user or
161
+ group by an ID that didn't exist (Unix).
162
+ * Added tests for intentional failures.
163
+ * Added lastlog information tothe User class (Unix).
164
+ * Modified the way User objects are created internally (Unix).
165
+ * Fixed a bug in the User#shell attribute (Unix).
166
+
167
+ == 1.0.0 - 25-Mar-2005
168
+ * Initial release
data/MANIFEST CHANGED
@@ -1,18 +1,18 @@
1
- * sys-admin.gemspec
2
- * CHANGES
3
- * MANIFEST
4
- * Rakefile
5
- * README
6
- * certs/djberg96_pub.pem
7
- * examples/groups.rb
8
- * examples/users.rb
9
- * lib/sys/admin.rb
10
- * lib/darwin/sys/admin.rb
11
- * lib/linux/sys/admin.rb
12
- * lib/bsd/sys/admin.rb
13
- * lib/sunos/sys/admin.rb
14
- * lib/sys/admin/common.rb
15
- * lib/sys/admin/custom.rb
16
- * test/test_sys_admin.rb
17
- * test/test_sys_admin_unix.rb
18
- * test/test_sys_admin_windows.rb
1
+ * sys-admin.gemspec
2
+ * CHANGES
3
+ * MANIFEST
4
+ * Rakefile
5
+ * README
6
+ * certs/djberg96_pub.pem
7
+ * examples/groups.rb
8
+ * examples/users.rb
9
+ * lib/sys/admin.rb
10
+ * lib/darwin/sys/admin.rb
11
+ * lib/linux/sys/admin.rb
12
+ * lib/bsd/sys/admin.rb
13
+ * lib/sunos/sys/admin.rb
14
+ * lib/sys/admin/common.rb
15
+ * lib/sys/admin/custom.rb
16
+ * test/test_sys_admin.rb
17
+ * test/test_sys_admin_unix.rb
18
+ * test/test_sys_admin_windows.rb
data/README CHANGED
@@ -1,154 +1,148 @@
1
- == Description
2
- The sys-admin library is a unified, cross platform replacement for the Etc module.
3
-
4
- == Installation
5
- gem install sys-admin
6
-
7
- == Synopsis
8
- require 'sys/admin'
9
- include Sys
10
-
11
- # Returns an Array of User objects
12
- a = Admin.users
13
-
14
- # Returns an Array of Group objects
15
- g = Admin.groups
16
-
17
- # Get information about a particular user
18
- p Admin.get_user("nobody")
19
- p Admin.get_user("nobody", :localaccount => true)
20
-
21
- # Get information about a particular group
22
- p Admin.get_group("adm")
23
- p Admin.get_group("adm", :localaccount => true)
24
-
25
- == Admin
26
- Admin.get_login
27
- Returns the user name (only) of the current login.
28
-
29
- Admin.get_user(name, options = {})
30
- Admin.get_user(uid, options = {})
31
- Returns a User object based on +name+ or +uid+. The +options+ hash is
32
- for MS Windows only, and allows you to restrict the search based on the
33
- options you provide, e.g. 'domain' or 'localaccount'.
34
-
35
- Admin.get_group(name, options = {})
36
- Admin.get_group(gid, options = {})
37
- Returns a Group object based on +name+ or +uid+. The +options+ hash is
38
- for MS Windows only, and allows you to restrict the search based on the
39
- options you provide, e.g. 'domain' or 'localaccount'.
40
-
41
- Admin.groups(options = {})
42
- Returns an Array of Group objects.
43
-
44
- The +options+ hash is for MS Windows only, and allows you to restrict the
45
- search based on the options you provide, e.g. 'domain' or 'localaccount'.
46
-
47
- Admin.users(options = {})
48
- Returns an Array of User objects.
49
-
50
- The +options+ hash is for MS Windows only, and allows you to restrict the
51
- search based on the options you provide, e.g. 'domain' or 'localaccount'.
52
-
53
- == User class
54
- === User (Windows)
55
- The User class has the following attributes on MS Windows systems:
56
-
57
- * account_type
58
- * caption
59
- * description
60
- * domain
61
- * password
62
- * full_name
63
- * gid
64
- * install_date
65
- * name
66
- * sid
67
- * status
68
- * disabled?
69
- * local?
70
- * lockout?
71
- * password_changeable?
72
- * password_expires?
73
- * password_required?
74
- * uid
75
-
76
- === User (Unix)
77
- The User class has the following attributes on Unix systems:
78
-
79
- * name
80
- * passwd
81
- * uid
82
- * gid
83
- * dir
84
- * shell
85
- * gecos
86
- * quota
87
- * age
88
- * class
89
- * comment
90
- * change
91
- * expire
92
-
93
- == Group Classes
94
- === Group (Windows)
95
- The Group class has the following attributes on MS Windows systems:
96
-
97
- * caption
98
- * description
99
- * domain
100
- * install_date
101
- * name
102
- * sid
103
- * status
104
- * gid
105
- * local?
106
-
107
- === Group (Unix)
108
- The Group class has the following attributes on Unix systems:
109
-
110
- * name
111
- * gid
112
- * members
113
- * passwd
114
-
115
- == Error Classes
116
- Admin::Error < StandardError
117
- Raised if anything goes wrong with any of the above methods.
118
-
119
- == Developer's Notes
120
- === MS Windows
121
- The Windows version now uses a win32ole + WMI approach to getting
122
- information. This means that the WMI service must be running on the
123
- target machine in order to work (which it is, by default).
124
-
125
- === UNIX
126
- The underlying implementation is similar to core Ruby's Etc implementation.
127
- But, in addition to the different interface, I use the re-entrant version
128
- of the appropriate functions when available.
129
-
130
- == Future Plans
131
- Make the User and Group objects comparable.
132
- Add ability to add, configure and delete users on Unix platforms.
133
-
134
- == Known Bugs
135
- None that I'm aware of. If you find any, please log them on the project
136
- page at:
137
-
138
- https://github.com/djberg96/sys-admin
139
-
140
- == Contributions
141
- Although this library is free, please consider having your company
142
- setup a gittip if used by your company professionally.
143
-
144
- http://www.gittip.com/djberg96/
145
-
146
- == License
147
- Artistic 2.0
148
-
149
- == Copyright
150
- (C) 2005-2015, Daniel J. Berger
151
- All Rights Reserved
152
-
153
- == Author
154
- Daniel J. Berger
1
+ == Description
2
+ The sys-admin library is a unified, cross platform replacement for the Etc module.
3
+
4
+ == Installation
5
+ gem install sys-admin
6
+
7
+ == Synopsis
8
+ require 'sys/admin' # or sys-admin
9
+ include Sys
10
+
11
+ # Returns an Array of User objects
12
+ a = Admin.users
13
+
14
+ # Returns an Array of Group objects
15
+ g = Admin.groups
16
+
17
+ # Get information about a particular user
18
+ p Admin.get_user("nobody")
19
+ p Admin.get_user("nobody", :localaccount => true)
20
+
21
+ # Get information about a particular group
22
+ p Admin.get_group("adm")
23
+ p Admin.get_group("adm", :localaccount => true)
24
+
25
+ == Admin
26
+ Admin.get_login
27
+ Returns the user name (only) of the current login.
28
+
29
+ Admin.get_user(name, options = {})
30
+ Admin.get_user(uid, options = {})
31
+ Returns a User object based on +name+ or +uid+. The +options+ hash is
32
+ for MS Windows only, and allows you to restrict the search based on the
33
+ options you provide, e.g. 'domain' or 'localaccount'.
34
+
35
+ Admin.get_group(name, options = {})
36
+ Admin.get_group(gid, options = {})
37
+ Returns a Group object based on +name+ or +uid+. The +options+ hash is
38
+ for MS Windows only, and allows you to restrict the search based on the
39
+ options you provide, e.g. 'domain' or 'localaccount'.
40
+
41
+ Admin.groups(options = {})
42
+ Returns an Array of Group objects.
43
+
44
+ The +options+ hash is for MS Windows only, and allows you to restrict the
45
+ search based on the options you provide, e.g. 'domain' or 'localaccount'.
46
+
47
+ Admin.users(options = {})
48
+ Returns an Array of User objects.
49
+
50
+ The +options+ hash is for MS Windows only, and allows you to restrict the
51
+ search based on the options you provide, e.g. 'domain' or 'localaccount'.
52
+
53
+ == User class
54
+ === User (Windows)
55
+ The User class has the following attributes on MS Windows systems:
56
+
57
+ * account_type
58
+ * caption
59
+ * description
60
+ * domain
61
+ * password
62
+ * full_name
63
+ * gid
64
+ * install_date
65
+ * name
66
+ * sid
67
+ * status
68
+ * disabled?
69
+ * local?
70
+ * lockout?
71
+ * password_changeable?
72
+ * password_expires?
73
+ * password_required?
74
+ * uid
75
+
76
+ === User (Unix)
77
+ The User class has the following attributes on Unix systems:
78
+
79
+ * name
80
+ * passwd
81
+ * uid
82
+ * gid
83
+ * dir
84
+ * shell
85
+ * gecos
86
+ * quota
87
+ * age
88
+ * class
89
+ * comment
90
+ * change
91
+ * expire
92
+
93
+ == Group Classes
94
+ === Group (Windows)
95
+ The Group class has the following attributes on MS Windows systems:
96
+
97
+ * caption
98
+ * description
99
+ * domain
100
+ * install_date
101
+ * name
102
+ * sid
103
+ * status
104
+ * gid
105
+ * local?
106
+
107
+ === Group (Unix)
108
+ The Group class has the following attributes on Unix systems:
109
+
110
+ * name
111
+ * gid
112
+ * members
113
+ * passwd
114
+
115
+ == Error Classes
116
+ Admin::Error < StandardError
117
+ Raised if anything goes wrong with any of the above methods.
118
+
119
+ == Developer's Notes
120
+ === MS Windows
121
+ The Windows version now uses a win32ole + WMI approach to getting
122
+ information. This means that the WMI service must be running on the
123
+ target machine in order to work (which it is, by default).
124
+
125
+ === UNIX
126
+ The underlying implementation is similar to core Ruby's Etc implementation.
127
+ But, in addition to the different interface, I use the re-entrant version
128
+ of the appropriate functions when available.
129
+
130
+ == Future Plans
131
+ Make the User and Group objects comparable.
132
+ Add ability to add, configure and delete users on Unix platforms.
133
+
134
+ == Known Bugs
135
+ None that I'm aware of. If you find any, please log them on the project
136
+ page at:
137
+
138
+ https://github.com/djberg96/sys-admin
139
+
140
+ == License
141
+ Apache 2.0
142
+
143
+ == Copyright
144
+ (C) 2005-2018, Daniel J. Berger
145
+ All Rights Reserved
146
+
147
+ == Author
148
+ Daniel J. Berger