Adding Entries to the Security Database

From InterBase
Jump to: navigation, search

To add users to the security database, use the add command:

a[dd] name -pw password [options]

followed by a user name, the -pw option followed by a password, and any other options, as shown in the following table. The password is case sensitive. None of the other parameters are case sensitive.

For each option, the initial letter or letters are required, and optional parts are enclosed in brackets. Each option must be followed by a corresponding argument, a string that specifies the data to be entered into the specified column in the InterBase security database (admin.ib by default).

Option Meaning

-password or -pa string

Password of user who is performing the change

-user string

User who is performing the change

-pw string

Target user password

-uid integer

Target user ID

-gid integer

Group ID for target user

-fname string

First Name for target user

-mname string

Middle Name for target user

-lname string

Last Name for target user

-user_database string

Name of user database

-database string

Name of remote security database

Note: The -pa switch specifies the root or the SYSDBA account password; -pw specifies the password for the user being added or modified.

For example, to add user “jones” and assign the password “welcome”, enter:

GSEC> add jones -pw welcome

Use display to verify the entry. An unassigned UID or GID defaults to 0:

GSEC> display
user name     uid     gid     full name
----------------------------------------------
JONES         0       0

For example, to add authorization for a user named Cindi Brown with user name “cbrown” and password “coffee2go”, use the following gsec command:

GSEC> add cbrown -pw coffee2go -fname cindi -lname brown

To verify the new entry, display the contents of the security database:

GSEC> display
user name     uid     gid     full name
----------------------------------------------
JONES        0       0
CBROWN       0       0       CINDI BROWN

gsec stores the user name in uppercase regardless of how it is entered.