Solaris CIFS Administration Guide

Autohome Entries

The Solaris CIFS service can automatically share home directories when a CIFS client connects. The autohome map file, /etc/smbautohome, uses the search options and rules to determine whether to share a home directory when a CIFS client connects to the service.

For example, the following entries specify the autohome rules for a particular environment:

+nsswitch	    dn=ads,dn=sun,dn=com,ou=users
jane    /home/?/&    dn=ads,dn=sun,dn=com,ou=users

The nsswitch autohome entry uses the naming service to match users to home directories. The second autohome entry specifies that the home directory for user jane is /home/j/jane.

Autohome Map Entry Format

A map entry, also referred to as a mapping, uses the following format:

key location [ container ]

key is a user name, location is the fully qualified path for the user's home directory, and container is an optional AD container.

If you intend to publish the share in AD, you must specify an AD container name, which is specified as a comma-separated list of attribute name-value pairs. The attributes use the Lightweight Data Access Protocol (LDAP) distinguished name (DN) or relative distinguished name (RDN) format.

The DN or RDN must be specified in LDAP format by using the following attribute types:

Note –

The attribute type that is used to describe an object's RDN is called a naming attribute.

AD uses the naming attributes as follows:

Autohome Map Key Substitution

The autohome feature supports the following wildcard substitutions for the value of the key field:

Wildcard Rule

When supplied in the key field, the asterisk character (*) is recognized as the “catch-all” entry. Such an entry matches any key not previously matched.

For example, the following entry would map any user to a home directory in /home in which the home directory name was the same as the user name:

*    /home/&

Note –

The wildcard rule is only applied if an appropriate rule is not matched by another map entry.

nsswitch Map

The nsswitch map is used to request that the home directory be obtained from a password database, such as the local, NIS, or LDAP database. If an AD path is appended, it is used to publish shares.


Like the “catch-all” entry, the nsswitch map is only searched if an appropriate rule is not matched by another map entry.

Note –

The wildcard and nsswitch rules are mutually exclusive. Do not include an nsswitch rule if a wildcard rule has already been defined.