Firebird Docset → Firebird Commandline Utilities → GSEC - Firebird Password File Utility → Interactive Mode |
To run GSEC in interactive mode, start the utility using the command line :
C:\>gsec -user sysdba -password masterkey GSEC>
The GSEC> prompt shows that the utility is waiting for a command. The -user and -password options are those of the user who wishes to manipulate the security database. Obviously, the username supplied must be a valid sysdba user if updates are to be carried out. Normal users may only read the database.
To exit GSEC in interactive mode, the quit command is used :
GSEC> quit C:\>
The following sections show how to carry out various commands in interactive mode. It is assumed that you are already running the utility as a sysdba user.
To display all users in the security database the command, and it's output are :
GSEC> display user name uid gid full name ------------------------------------------------------------------------ SYSDBA 0 0 NORMAN 0 0 Norman Dunbar EPOCMAN 0 0 Benoit Gilles Mascia GSEC>
To display details of a single user, pass the username as a parameter to the display command.
GSEC> display epocman user name uid gid full name ------------------------------------------------------------------------ EPOCMAN 0 0 Benoit Gilles Mascia GSEC>
If you enter the name of a non-existent user as a parameter of the display command, nothing is displayed and GSEC remains in interactive mode.
GSEC> display alison GSEC>
When adding a new user in interactive mode, nothing is displayed to confirm that the user was indeed added. You need to use the display or display <name> commands to make sure that the user was added successfully.
GSEC> add newuser -pw newuser -fname New -lname User GSEC>
GSEC> display newuser user name uid gid full name ------------------------------------------------------------------------ NEWUSER 0 0 New User GSEC>
When deleting a user in interactive mode, there is no confirmation that the user has been deleted. You should use the display or display <name> command to check.
GSEC> delete newuser GSEC>
GSEC> display user name uid gid full name ------------------------------------------------------------------------ SYSDBA 0 0 NORMAN 0 0 Norman Dunbar EPOCMAN 0 0 Benoit Gilles Mascia GSEC>
If, on the other hand, you try to delete a non-existing user, GSEC will display an error message, and exit.
GSEC> delete newuser record not found for user: NEWUSER C:\>
Existing users can have one or more of their password, first name, middle name or lastname amended. There is no confirmation that your modification has worked, so you must use one of the display commands to determine how well it worked.
GSEC> modify norman -pw newpassword GSEC>
GSEC> modify norman -mname MiddleName -fname Fred GSEC>
GSEC> display norman user name uid gid full name ------------------------------------------------------------------------ NORMAN 0 0 Fred MiddleName Dunbar GSEC>
If you wish to remove one or more of a user's attributes, don't pass a (new) value for that attribute.
GSEC> modify norman -mname -fname -lname
GSEC> display norman user name uid gid full name ------------------------------------------------------------------------ NORMAN 0 0
Now I can be known as 'the man with no name', just like Clint Eastwood !
Firebird Docset → Firebird Commandline Utilities → GSEC - Firebird Password File Utility → Interactive Mode |