Previous | Table of Contents | Next |
The home directory is that portion of a file system that is allocated to an individual user for storing private files. The amount of space you allocate for a home directory may vary, depending on the kinds of files the users create and the type of work they do. You should probably allocate at least 15 Mbyte of disk space for each user's home directory.
A user's home directory can be either on the local system or on a remote file server. In either case, by convention the home directory is created as /export / home /login-name. Note that this convention is new with Solaris 2.x. The server name is no longer included as part of the user's home directory path. On a large server that supports a number of users' home directories, there may be a number of directories under /export--such as home1, home2, home3, and so on--with directories for different users under them. Regardless of where their home directory is located, users access their home directory through a mount point named / home/login-name.
Always refer to the home directory as $HOME, not as /export/home/username. In addition, use relative paths to create any symbolic links in a user's home directory (for example, ../../../x/y/x), so that the links are valid no matter where the home directory is mounted.
This section describes the default procedure for Solaris 2.x, which assumes that the user's system is on a network and that AutoFS is used to make the home directory accessible. Whether the home directory originates on a server or on the local system, you need to make it accessible to other systems by using the share command to export the file system so that the user can access the home directory from other systems on the network.
In addition, you need to define how the home directory is mounted, by either:
To support automatic mounting of home directories, the SunOS 5.x system software includes this entry in the /etc/auto_master file:
/home /etc/auto_home
This entry tells AutoFS to mount the directories specified in the auto_home database onto the /home mount point on the local system. The entries in auto_home use this format:
login-name system-name:/export/home/login-name
When a user logs in with login-name, AutoFS mounts the specified directory (/export/home/login-name) from f the specified system (system-name) onto the /home mount point on the system to which the user is logged in.
This method works even when the home directory is stored on the same system to which the user has logged in. But more importantly, the user can log in to any other system and have his or her home directory mounted on /home on that system.
NOTE: When AutoFS is used to mount home directories, you are not permitted to create any directories under the /home mount point on the user's system. The system recognizes the special status of /home when AutoFS is active.
To create a home directory, you must already have created the user's account. You need this information:
All these steps apply regardless of whether the home directory is created on the local system or on a remote file server:
# cd /export/home1
# mkdir ignatz
# chown ignatz ignatz
# chgrp staff ignatz
# chmod 755 /export/home1/ignatz #
Previous | Table of Contents | Next |