LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS

To remove an IP address for a host, use the -i option with the ! flag in front of the IP address to
be removed. For example, to remove the address added in the previous example:
# ldaphostmgr -i !192.168.10.10 brewer
bind-dn [uid=domadmin,ou=People,dc=mydomain,dc=example,dc=com]:
Password:
# ldaphostlist -n brewer
dn: cn=brewer,ou=Hosts,dc=mydomain,dc=example,dc=com
cn: brewer
ipHostNumber: 16.92.96.113
To remove all IP addresses for a host, use the -i option with the ! flag by itself. However, after
removing all IP addresses, the special address 0.0.0.0 is added to assure that the ipHost object
class can remain as part of the host entry. The ipHost object class is the only standard object
class that is used to identify hosts and distinguish them from other types of devices. Example:
# ldaphostmgr -i "!" brewer
bind-dn [uid=domadmin,ou=People,dc=mydomain,dc=example,dc=com]:
Password:
# ldaphostlist -n brewer
dn: cn=brewer,ou=Hosts,dc=mydomain,dc=example,dc=com
cn: brewer
ipHostNumber: 0.0.0.0
To remove all ipHostNumber attributes, use the -R option. This removes both the ipHostNumber
attribute and the ipHost object class. However, when this occurs, ldaphostlist is no longer
able to display the host, since the ipHost object class is the critical object class used to distinguish
hosts from other types of devices managed in the directory server. You can use the -F option to
override the default ldaphostlist search filter to find hosts or other types of devices that do
not use the ipHost object class. Example:
# ldaphostmgr -R iphostNumber -R objectclass=iphost brewer
bind-dn [uid=domadmin,ou=People,dc=mydomain,dc=example,dc=com]:
Password:
# ldaphostlist -n brewer
1
# ldaphostlist -F "(&(objectclass=device)(cn=brewer))"
dn: cn=brewer,ou=Hosts,dc=mydomain,dc=example,dc=com
cn: brewer
1
No host was found
7.8.5 Managing hosts in groups
There are several ways to group hosts. You can accomplish simple grouping by adding hosts as
members of the traditional X.500 group structures. Use the -G option to do this. The -G option
supports the ! flag to remove a host from a group, similar to the -i option. Note that in a POSIX
environment, the grouping of hosts is not a native construct. Users may be members of groups, but
hosts may not. In an HP directory server, any object in the directory server may be a member of
any X.500 style group. So, grouping of hosts using the -G option can add hosts only as members
of the X.500 style groups, identified with the groupOfNames or groupOfUniqueNames object
classes. While you can list members of these types of groups using the /opt/ldapux/bin/
ldapsearch utility, you can also extend the display capabilities of the ldapuglist tool to list
groups that are standard X.500 groups and contain hosts as members. The following example
shows how to add a host to a group (dbhosts) that already has one member (baker):
# ldapuglist -t group -P -F "(cn=dbhosts)" uniqueMember
bind-dn [uid=domadmin,ou=People,dc=mydomain,dc=eample,dc=com]:
Password:
dn: cn=dbhosts,ou=groups,dc=mydomain,dc=eample,dc=com
cn: dbhosts
uniqueMember: cn=baker,ou=Hosts,dc=mydomain,dc=eample,dc=com
# ldaphostmgr -G dbhosts chef
7.8 Managing hosts in an LDAP-UX domain 239