Adding a User to the Security Database

From InterBase
Jump to: navigation, search

Go Up to Configuring Users


Use the AddUser method along with the following properties to add a user to the InterBase security database (admin.ib by default).

TIBSecurityService properties
Property Purpose

UserName

User name to create; maximum 31 characters

Password

Password for the user; maximum 31 characters, only first 8 characters are significant

FirstName

Optional first name of person using this user name

MiddleName

Optional middle name of person using this user name

LastName

Optional last name of person using this user name

UserID

Optional user ID number, defined in /etc/passwd, to assign to the user

GroupID

Optional groupID number, defined in /etc/group, to assign to the user

SQLRole

Optional role to use when attaching to the security database; for more information on roles in InterBase, refer to “ANSI SQL 3 roles” in the Operations Guide.

The following code snippet allows you to set user information in Edit components, and then adds the user with the AddUser method.

try
  UserName := Edit1.Text;
  FirstName := Edit2.Text;
  MiddleName := Edit3.Text;
  LastName := Edit4.Text;
  UserID := StrToInt(Edit5.Text);
  GroupID := StrToInt(Edit6.Text);
  Password := Edit7.Text;
  AddUser;
finally

Advance To: