Determining a User's Default Project

To log in to
the system, a user must be assigned a default project. A user is automatically
a member of that default project, even if the user is not in the user or group
list specified in that project.

Because each process on the system possesses project membership, an
algorithm to assign a default project to the login or other initial process
is necessary. The algorithm is documented in the man page getprojent(3C). The system follows ordered steps to determine the default
project. If no default project is found, the user's login, or request to start
a process, is denied.

The system sequentially follows these steps to determine a user's default
project:

If the user has an entry with a project attribute
defined in the /etc/user_attr extended user attributes
database, then the value of the project attribute is the
default project. See the user_attr(4) man
page.

If a project with the name user.user-id is present in the project database, then
that project is the default project. See the project(4) man page for more information.

If a project with the name group.group-name is present in the project database,
where group-name is the name of the default group
for the user, as specified in the passwd file, then that
project is the default project. For information on the passwd file,
see the passwd(4) man
page.

If the special project default is present
in the project database, then that project is the default
project.

This logic is provided by the getdefaultproj() library
function. See the getprojent(3PROJECT) man page for more information.