For information about dejasync, see Appendix B, dejasync Command Reference, or the dejasync(1M) manpage. To add a NIS map to Deja from the nis.mapping file using dejasync:
Login as root or become superuser on the directory server.
Add the name of the map, and the label you want to be used in the NIS Maps option button, to the NIS_MAPS definition.
The map must be defined in the nis.mapping file. For example to add the ethers.byname map to Deja using the label Ethers, the NIS_MAPS definition will look like this:
NIS_MAPS= ethers.byname;Ethers, passwd.byname;NIS_MAP_USERS_CHOICE, mail.aliases;NIS_MAP_ALIASES_CHOICE, hosts.byname;NIS_MAP_HOSTS_CHOICE, group.byname;NIS_MAP_GROUPS_CHOICE |
Run dejasync by typing:
prompt# /opt/SUNWconn/ldap/sbin/dejasync -d Deja_properties_directory -n NIS_mapping_file |
Where:
Deja_properties_directory specifies the directory containing the Deja.properties file. By default this is /opt/SUNWconn/ldap/html.
NIS_mapping_file specifies the filename of the NIS mapping file. By default this is /etc/opt/SUNWconn/ldap/current/mapping/nis.mapping.
The dejasync utility reads the map declarations in NIS_MAPS, reads the definitions from the nis.mapping file, and updates or adds the corresponding map definitions to the Deja.properties file.
For the example, the following map definition is added at the end of the Deja.properties file:
NIS_OCLASS.ethers.byname= ieee802Device NIS_FILTER.ethers.byname= (&(objectClass=ieee802Device)(cn=$NIS_KEY)) NIS_NAMINGATTR.ethers.byname=cn NIS_ROOT.ethers.byname=dc=xyz,dc=com NIS_DOMAIN.ethers.byname=xyz.com |
Optionally add NIS_LIST and NIS_ADD definitions for the new map.
Exit from Deja and restart it to use the new map.
For the example, the following definitions are added for NIS_LIST and NIS_ADD:
NIS_LIST.ethers.byname=cn;Host Name, macAddress;Ethernet Address, description;Comments NIS_ADD.ethers.byname=cn;Host Name, macAddress;Ethernet Address, description;Comments |
# # list of supported maps # NIS_MAPS=passwd.byname;NIS_MAP_USERS_CHOICE, mail.aliases;NIS_MAP_ALIASES_CHOICE, hosts.byname;NIS_MAP_HOSTS_CHOICE, group.byname;NIS_MAP_GROUPS_CHOICE # # passwd map # NIS_FILTER.passwd.byname= (&(objectclass=posixAccount)(uid=$NIS_KEY)) NIS_DOMAIN.passwd.byname= xyz_users.com NIS_NAMINGATTR.passwd.byname=cn NIS_ROOT.passwd.byname= dc=xyz_users,dc=com NIS_OCLASS.passwd.byname= posixaccount,person NIS_LIST.passwd.byname=cn;NIS_USER_CN_ATTR_LABEL, uid;NIS_UID_ATTR_LABEL, uidNumber;NIS_UIDNUMBER_ATTR_LABEL, gidNumber;NIS_GIDNUMBER_ATTR_LABEL, homeDirectory;NIS_HOMEDIRECTORY_ATTR_LABEL NIS_ADD.passwd.byname=cn;NIS_USER_CN_ATTR_LABEL, sn;NIS_SN_ATTR_LABEL, uid;NIS_UID_ATTR_LABEL, uidNumber;NIS_UIDNUMBER_ATTR_LABEL;int, gidNumber;NIS_GIDNUMBER_ATTR_LABEL;int, homeDirectory;NIS_HOMEDIRECTORY_ATTR_LABEL, userPassword;NIS_USERPASSWORD_ATTR_LABEL;crypt, loginShell;NIS_LOGINSHELL_ATTR_LABEL, description;NIS_DESCRIPTION_ATTR_LABEL # # alias map # NIS_FILTER.mail.aliases= (&(objectclass=nisMailAlias)(cn=$NIS_KEY)) NIS_DOMAIN.mail.aliases= xyz_aliases.com NIS_NAMINGATTR.mail.aliases=cn NIS_ROOT.mail.aliases= dc=xyz_aliases,dc=com NIS_OCLASS.mail.aliases= nismailalias NIS_LIST.mail.aliases= cn;NIS_ALIAS_CN_ATTR_LABEL, rfc822mailMember;NIS_RFC822MAILMEMBER_ATTR_LABEL NIS_ADD.mail.aliases= cn;NIS_ALIAS_CN_ATTR_LABEL, rfc822mailMember;NIS_RFC822MAILMEMBER_ATTR_LABEL # # host map # NIS_FILTER.hosts.byname= (&(objectclass=ipHost)(cn=$NIS_KEY)) NIS_DOMAIN.hosts.byname= xyz_hosts.com NIS_NAMINGATTR.hosts.byname=cn NIS_ROOT.hosts.byname= dc=xyz_hosts,dc=com NIS_OCLASS.hosts.byname= ipHost NIS_LIST.hosts.byname= cn;NIS_HOST_CN_ATTR_LABEL, ipHostNumber;NIS_IPHOSTNUMBER_ATTR_LABEL, macaddress;NIS_MACADDRESS_ATTR_LABEL NIS_ADD.hosts.byname= cn;NIS_HOST_CN_ATTR_LABEL, ipHostNumber;NIS_IPHOSTNUMBER_ATTR_LABEL;ipaddr, macaddress;NIS_MACADDRESS_ATTR_LABEL, l;NIS_L_ATTR_LABEL # # group map # NIS_FILTER.group.byname= (&(objectclass=posixGroup)(cn=$NIS_KEY)) NIS_DOMAIN.group.byname= xyz_groups.com NIS_NAMINGATTR.group.byname=cn NIS_ROOT.group.byname= dc=xyz_groups,dc=com NIS_OCLASS.group.byname= posixGroup NIS_LIST.group.byname= cn;NIS_GROUP_CN_ATTR_LABEL, gidNumber;NIS_GIDNUMBER_ATTR_LABEL, memberUid;NIS_MEMBERUID_ATTR_LABEL NIS_ADD.group.byname= cn;NIS_GROUP_CN_ATTR_LABEL, gidNumber;NIS_GIDNUMBER_ATTR_LABEL;int, memberUid;NIS_MEMBERUID_ATTR_LABEL NIS_LIST.default= cn;NIS_CN_ATTR_LABEL |