1 Reply Latest reply: Feb 1, 2013 9:04 AM by 955737 RSS

    help with removing realm DNS aliases from openam 9

    955737
      Hello All,

      I’m trying to remove couple of realm DNS aliases but for some reason it looks like they silently fail. Here is what I do:
      $ /path/to/ssoadm get-realm -s sunIdentityRepositoryService -e / -u amadmin -f /path/to/pass/.mypass
      sunOrganizationAliases=host1.domain1.com
      sunOrganizationAliases=domain1.com
      sunOrganizationStatus=Active
      
      $ /path/to/ssoadm delete-realm-attr -e / -u amadmin -f /path/to/pass/.mypass -s sunIdentityRepositoryService -a sunOrganizationAliases=domain1.com
      Attribute was removed.
      # so now I want to see:
      $ /path/to/ssoadm get-realm -s sunIdentityRepositoryService -e / -u amadmin -f /path/to/pass/.mypass
      sunOrganizationAliases=host1.domain1.com
      sunOrganizationAliases=domain1.com
      sunOrganizationStatus=Active
      Second command states that it worked but it didn’t and I don’t understand why. Any help apprieciated.

      Thank you
        • 1. Re: help with removing realm DNS aliases from openam 9
          955737
          Hello,
          so I finally figured it out. It's a bit odd behavior & odd way of doing it but it works and it has to be done in the exact same way (case sensitive). You could add 'get-realm' to the batch script to make it a little faster. Basically we need to overwrite current entries instead of removing and adding new ones, maybe it is like that to make it easier for Admins to work from command line.. :)
          [tomcat@cent03 prepare_realms]$ cat add-realms.conf
          set-realm-attrs -e / -u amadmin -f /path/to/pass/.mypass -s sunIdentityRepositoryService --attributevalues sunOrganizationAliases=host03.domain2.com sunOrganizationAliases=domain3.com sunOrganizationAliases=www.user-test.net sunOrganizationAliases=www.another-link-test.net
          
          [tomcat@cent03 prepare_realms]$ /path/to/ssoadm do-batch  -u amadmin -f /path/to/pass/.mypass -Z add-realms.conf --batchstatus add-realms.conf.status
          
          Attribute values were set.
          [tomcat@cent03 prepare_realms]$
          [tomcat@cent03 prepare_realms]$
          [tomcat@cent03 prepare_realms]$ /path/to/ssoadm get-realm -s sunIdentityRepositoryService -e / -u amadmin -f /path/to/pass/.mypass
          
          
          sunOrganizationAliases=host03.domain2.com 
          sunOrganizationAliases=domain3.com 
          sunOrganizationAliases=www.user-test.net 
          sunOrganizationAliases=www.another-link-test.net
          sunOrganizationStatus=Active
          I hope that will help others too.