After a successful installation of Firebird, the /opt/firebird/bin
directory will contain a number of useful shell scripts.This manual gives details of what these scripts are for and how they are used.
In the remainder of this manual, we will discuss the following scripts:
changeDBAPassword.sh
createAliasDB.sh
fb_config
changeRunUser.sh
restoreRootRunUser.sh
changeGdsLibraryCompatibleLink.sh (Classic server only.)
Note
|
The above list is correct at the time of writing and, unless otherwise noted, only applies to Firebird 1.5, 2.0 and 2.1 Super Server installed on a Linux system.Other flavours of Unix may have different scripts.I am currently unable to discuss those potential changes as I do not have access to other Unix systems. |
The changeDBAPassword.sh
script allows the password for the SYSDBA user to be changed and various startup scripts etc to have their ownership changed accordingly.The script is run in non-interactive mode as part of the installation process to create an initial randomly generated password which is stored in the /opt/firebird/SYSDBA.password
file.
Up until version 2.1 of Firebird, the password is subsequently used in the startup script /etc/rc.d/init.d/firebird
, which also has a symlink set up to point to /etc/init.d/firebird
.
The security database (/opt/firebird/security.fdb
or /opt/firebird/security2.fdb
— depending on your Firebird version) is also updated with the new password.
Caution
|
The script must be run as the root user, and when run, After the script has been run, the file |
The following is an example of running the script to change the SYSDBA password from 'masterkey' to 'biroguin' which, being a made up word, should be less crackable or guessable.
# cd /opt/firebird/bin # ./changeDBAPassword.sh Please enter current password for SYSDBA user : masterkey Please enter new password for SYSDBA user : biroguin GSEC> GSEC> Running ed to modify /etc/init.d/firebird
Caution
|
Whenever you change the SYSDBA password using the This doesn’t apply when using Firebird 2.1 and above as the startup script no longer requires the SYSDBA password. In the example above, the last line of output will not be displayed on systems running Firebird 2.1 and above as the startup scripts are no longer changed when the SYSDBA password is modified. |
The createAliasDB.sh
script allows the creation of a new database to be carried out, and an alias for that database to be created in the file /opt/firebird/aliases.conf
.
Note
|
The |
If your system is not set up properly, the database creation step may fail but the alias will still be added to the aliases file.This could leave you subsequently unable to add the alias properly, as the script checks to ensure that you do not overwrite an existing alias.You will have to manually edit the alias file to remove the broken alias.
All databases must be owned by the firebird user, and by the firebird group.The following shows a new directory being created by the root user to allow Firebird databases to be created.
# cd /u01 # mkdir databases # chown firebird:firebird databases
At this point the directory /u01/databases
is available for use as a repository for one or more Firebird databases.Obviously, in the above example, the /u01
directory already existed.