Determine the UID and GID you will assign to the FTP subscriber and subscriber directories.
Create an LDIF file defining the virtual host type (org, net, com, edu, and so on), virtual host name, country code, subscriber directory, UID, and GID.
You can use the following example as a template, replacing:
country_code with the two-letter code for your country, for example us, de, ca, and so on.
virtual_host_type with the virtual host type.
For example if the virtual host is accessed via myVH.org, you would replace virtual_host__type with org
Your_ISP_Name with the name of your ISP.
Virtual_host_Name with the name of the virtual host.
For example if the virtual host is accessed via myVH.org, you would replace virtual_host__name with myVH.
virtual_host_dir with the full path name to the virtual host root directory.
For example if the virtual host myVH.org is located in /export/home/myVH.org, you would replace virtual_host__dir with /export/home/myVH.org.
dn: dc=virtual_host_type dc: virtual_host_type objectclass: domain dn: ou=virtual_host_name,o=Your_ISP_Name,c=country_code ou: virtual_host_name associateddomain: virtual_host_name.virtual_host_type objectclass: organizationalUnit objectclass: domainRelatedObject objectclass: top dn: dc=virtual_host_name,dc=virtual_host_type dc: virtual_host_name objectclass: domain objectclass: labeledURIObject associatedname: ou=virtual_host_name,o=Your_ISP_Name,c=country_code description: DNS to DN mapping for virtual_host_name.virtual_host_type labeleduri: ldap:///ou=virtual_host_name,o=Your_ISP_Name,c=country_code??sub dn: ou=Services,ou=virtual_host_name,o=Your_ISP_Name,c=country_code ou: Services objectclass: organizationalUnit dn: ou=Groups,ou=virtual_host_name,o=Your_ISP_Name,c=country_code ou: Groups objectclass: organizationalUnit dn: ou=People,ou=virtual_host_name,o=Your_ISP_Name,c=country_code ou: People objectclass: organizationalUnit dn: ou=SUNWftp,ou=Services,ou=virtual_host_name,o=Your_ISP_Name,c=country_code ou: SUNWftp objectclass: organizationalUnit dn: ispversion=1.0,ou=SUNWftp,ou=Services,ou=virtual_host_name,o=Your_ISP_Name,c=country_code ispversion: 1.0 cn: SUNWftp objectclass: ispservice ispdirectoryroot:virtual_host_dirdn: cn=ftp,ou=People,ou=virtual_host_name,o=Your_ISP_Name,c=country_codecommonname: ftp uid: ftp sn: ftp userpassword: ftp objectclass: ispSubscriber uidnumber: 60001 gidnumber: 70001 ispcontentdirectory: virtual_host_dir |
Before saving the file, ensure there are no trailing blanks. If there are any trailing blanks, ldapadd will report a syntax error.
Save the file as virtual_host_name.ldif, for example, myVH.ldif
The virtual host and subscriber information is added using the ldappadd command syntax:
# ldapadd -v -D"bindDN" -w bindPassword -f filename.ldif
You are logged in as root on the computer where Sun Directory Services and the Solaris FTP server are installed.
The password of the Directory Service administrator is ftp555.
The country code is us.
The Directory Service administrator distinguished name is "cn=admin,o=intra,c=us".
Your corporate domain name is intra.net.
You have created and saved the LDAP configuration file as myVH.ldif.
The command to add the virtual host and subscriber information to LDAP would then be:
# ldapadd -v -D"cn=admin,o=intra,c=us" -w ftp555 -f myVH.ldif