MIGGUI migration fails on the maptrustees command

  • 7006884
  • 22-Sep-2010
  • 26-Apr-2012


Novell Open Enterprise Server 2 (OES 2) Linux Support Pack 2


In the migration log file the following can be seen:

FATAL - FILESYSTEM:maptrustees:Fatal: Caught exception: private method `gsub!' called for nil:NilClass
ERROR - FILESYSTEM:maptrustees:maptrustees command failed!

The migration debug log file shows:

DEBUG - 2> Fatal: Caught exception: private method `gsub!' called for nil:NilClass
DEBUG - 2>  Backtrace:
DEBUG - 2>  /opt/novell/migration/sbin/maptrustees:311:in `map_ldap'
DEBUG - 2> /opt/novell/migration/sbin/maptrustees:263:in `map_ldap'
DEBUG - 2> /opt/novell/migration/sbin/maptrustees:836:in `main'
DEBUG - 2> /opt/novell/migration/sbin/maptrustees:833:in `main'
DEBUG - 2> /usr/lib/ruby/1.8/yaml.rb:217:in `each_document'
DEBUG - 2> /usr/lib/ruby/1.8/yaml.rb:232:in `load_documents'
DEBUG - 2> /opt/novell/migration/sbin/maptrustees:831:in `main'
DEBUG - 2> /opt/novell/migration/sbin/maptrustees:903


The error can be seen if one of the attributes of an e-Directory object being read is returned as NIL or empty, commonly this can be seen for the loginScript entry of an Organistion or Organisational Unit object.

Clear the attribute completely or add a proper entry for the attribute and the maptrustees command will not fail.

For example, when a value for the loginScript attribute is added through iManager, a carriage return is added at the end. When the loginScript attribute is cleared for some reason it needs to be ensured that the carriage return is also removed. If only the characters are removed without taking care to also clear the carriage return, the deletion is in effect not complete, and ldapsearch will return the value "", not NIL, but actually an empty string.

Additional Information

Run only the maptrustees command adding the --debug option to establish for which e-Directory object the error is returned. The command can look something like the following example;

/opt/novell/migration/sbin/maptrustees --source-server --posix  "/root/migration/my_volume/my_volume_mls.yaml" --progress --progress-interval 1 --source-ldap-port 636 --debug

The debug log file for the maptrustees command by default can be found in /var/opt/novell/log/migration/. Looking at the debug file, it should list the last e-Directory object being read just prior to the fatal error being returned. For example;

D, [09-09-2010 10:12:07#15211] DEBUG -- maptrustees: mapped OU=TST,OU=SERVICES,O=NOVELL to OU=TST,OU=SERVICES,O=NOVELL
F, [09-09-2010 10:12:07#15211] FATAL -- maptrustees: Caught exception: private method `gsub!' called for nil:NilClass

This last object listed prior to the error is the e-Directory object with the problem. To establish which attribute are being returned as NIL (empty) run the following ldapsearch command against this e-Directory object;

ldapsearch -LLL -b "OU=SERVICES,O=NOVELL" -s one -H ldaps:// -x -D "sourceUserFDN" -W 'OU=TST' CN description mail facsimileTelephoneNumber fullName generationQualifier givenName initials Language l loginAllowedTimeMap loginDisabled loginExpirationTime loginGraceLimit loginGraceRemaining loginMaximumSimultaneous loginScript networkAddressRestriction o ou passwordAllowChange passwordExpirationInterval passwordExpirationTime passwordMinimumLength passwordRequired passwordUniqueRequired physicalDeliveryOfficeName postOfficeBox postalAddress postalCode st street sn telephoneNumber title uid ndsHomeDirectory objectClass groupMembership securityEquals member equivalentToMe l s c

The output returned will look something like this, showing an empty value for the loginScript attribute;

dn: ou=tst,ou=services,o=novell
objectClass: organizationalUnit
objectClass: ndsLoginProperties
objectClass: ndsContainerLoginProperties
objectClass: Top
ou: services