Open ericfranz opened 6 years ago
The members method would return an array of OodSupport::User objects
This is the wrapper around doing something like:
Etc.getgrnam('wiagdev').mem.map { |u| { u => Etc.getpwnam(u).gecos } } => [{"mrodgers"=>"Morgan Rodgers"}, {"efranz"=>"Eric Franz"}, {"an0047"=>"Eric Franz"}, {"osu10424"=>"Eric Franz"}]
If I want to get usernames and associated gecos names I could instead do this:
OodSupport::Group.new('wiagdev').members # => [#<OodSupport::User: username=mrodgers gecos="Morgan Rodgers">, #<OodSupport::User: username=efranz gecos="Eric Franz">, #<OodSupport::User: username=an0047 gecos="Eric Franz">
For OSC we will need to use ldapsearch for the group names instead of getgrnam
ldapsearch
getgrnam
The members method would return an array of OodSupport::User objects
This is the wrapper around doing something like:
If I want to get usernames and associated gecos names I could instead do this: