2 Introduction
The users "dba" (administrator) and "public" (generic user) are predefined when the database environment is created. The "PASSWORDS" defined in the database schema are converted into authorization groups and the read/write list is converted to the apropriate privileges.
Eloquence has a new statement to deal with this:
DBLOGON(User$, Passwd$)
This will save the provided user id and password for a later connect to the database server. If you omit the DBLOGON statement, the user "public" will be assumed. When you do the first DBOPEN on a database server, the authorization information is submitted and verified by the server.
The Password field in the DBOPEN statement is no longer used, because the access capabilites are defined by the user/group.
The capabilities of a user for a specific database depends on the groups he/she is associated with. So while you cannot delete the predefined users, you can simply remove them from all authorization groups for a particular database and they end up with no access or deny the connect privilege and the server will deny the connection at all.
A sensible administrator would create real user names and associate them with authorization groups. As an additional benefit, you have a single user name/password for all databases (on a single server). Schema associates the public user with all authorization groups but this can easily be changed with the dbutil utility.
The user name is a random name, for example "marc". The password is an arbitrary string, eg. "The secret password". The server will validate the user and password on connction and associate the session with effective privileges.
A user may be a member of up to 8 groups per database. It will get all capabilities associated with those groups. There is no limit on the number of user names and groups.
Group capabilities which are not data set specific are specified by group privileges. The following group privileges are available:
The following table specific privileges are available:
user id | Description | Default Privileges |
---|---|---|
dba | default administration user. | DBA, UADMIN |
public | Default user. This is used when no user id is known when opening a database (missing DBLOGON before opening a database) and is provided for backward compatibility. | CONNECT |
NOTE: The default users should not be deleted, as they are used when creating a new database to provide a default. If you don't want them, simply remove the user privileges and they are no longer active.
group id | Privileges | Assigned users |
---|---|---|
dba | GADMIN, DBPRIV | dba |
public | public | |
As defined in schema | As defined in schema | public |
Operation | Privileges |
---|---|
Connect to the server | CONNECT or DBA |
Manage database user | UADMIN |
Manage user privileges | UADMIN |
Create database catalog (schema) | DBA |
Add database group | DBPRIV |
Assign user to database group | DBPRIV |
Manage group privileges | DBPRIV |
Create a database (DBCREATE) | DBA or DADMIN |
Purge a database (DBPURGE) | DBA or DADMIN |
Erase data sets | DBA, DADMIN or ERASE privilige on specific data set |