Sha256: 71469b1de2d888d2bce0d5b6efb8e321c9bcb17881102abb07bf0bbaf735032b

Contents?: true

Size: 618 Bytes

Versions: 5

Compression:

Stored size: 618 Bytes

Contents

#!/usr/bin/env ruby

require 'active_samba_ldap'
require 'active_samba_ldap/command'

include ActiveSambaLdap::GetTextSupport

argv, opts, options = ActiveSambaLdap::Command.parse_options do |opts, options|
  opts.banner += " USER_NAME"
end

name = nil
if argv.size == 1
  name = argv.first
else
  $stderr.puts opts
  exit 1
end

ActiveSambaLdap::Base.setup_connection("reference")

class User < ActiveSambaLdap::User
  ldap_mapping
end

unless User.exists?(name)
  $stderr.puts(_("user doesn't exist: %s") % name)
  exit 1
end
user = User.find(name)
puts user.to_ldif

ActiveSambaLdap::Base.clear_active_connections!

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
activesambaldap-0.1.0 bin/asl-usershow
activesambaldap-0.0.9 bin/asl-usershow
activesambaldap-0.0.8 bin/asl-usershow
ActiveSambaLdap-0.0.7 bin/asl-usershow
activesambaldap-0.0.7 bin/asl-usershow