Issue Details (XML | Word | Printable)

Key: CORE-3721
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alexander Peshkov
Reporter: Paul Reeves
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Multiuser server startup (/etc/init.d) script picks up the ISC_ variables if set.

Created: 09/Jan/12 04:48 PM   Updated: 23/Apr/13 01:32 PM
Component/s: Installation
Affects Version/s: 2.5.1
Fix Version/s: 2.1.5, 2.5.2, 3.0 Alpha 1

Time Tracking:
Not Specified

Environment: Linux, perhaps all environments that attempt to change the SYSDBA password at installation time.

Planning Status: Unspecified


 Description  « Hide
If ISC_USER/ISC_PASSWORD are set install script fails when it tries to set the new sysdba password. It happens because fbmgr is using the ISC_USER variable, but onl;y root/firebird/sysdba may start server.


 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 12/Jan/12 09:59 AM
Paul, I could not reproduce an issue.
Look here:

fbs2 bin # export ISC_USER=qq
fbs2 bin # export ISC_PASSWORD=qq
fbs2 bin # ./changeDBAPassword.sh
This script is deprecated and should be removed in newer FB versions.
Please use gsec utility directly to change SYSDBA password.
Please enter current password for SYSDBA user: masterkey
Please enter new password for SYSDBA user: abc
fbs2 bin # ./changeDBAPassword.sh
This script is deprecated and should be removed in newer FB versions.
Please use gsec utility directly to change SYSDBA password.
Please enter current password for SYSDBA user: abc
Please enter new password for SYSDBA user: masterkey
fbs2 bin # echo $ISC_USER
qq
fbs2 bin # echo $ISC_PASSWORD
qq

And this looks like expected behavior loogin at the script. gsec is invoked with -user and -password switches:

/opt/firebird.CS.2.5/bin/gsec -user sysdba -password $OrigPasswd -modify sysdba -pw $NewPasswd

In this case env vars are not picked up at all.

I.e. I need more details.

Paul Reeves added a comment - 12/Jan/12 10:16 AM
If I recall correctly exported variables aren't detected by a script run in the same shell. It picks up the parent environment. It might work as expected if you try:

fbs2 bin # export ISC_USER=qq
fbs2 bin # export ISC_PASSWORD=qq
fbs2 bin # source changeDBAPassword.sh

What I was doing was exporting the ISC_variables from profile.local so that all shells had the variables set. In future I'm going to remove this from profile.local and configure individual users via .bashrc.


Alexander Peshkov added a comment - 12/Jan/12 02:16 PM
I tried with both changeDBAPassword and install scripts.

fbs2 opt # export ISC_PASSWORD=qq
fbs2 opt # export ISC_USER=qq
fbs2 FirebirdCS-2.5.1.26351-0.amd64 # source install.sh

Firebird classic 2.5.1.26351-0.amd64 Installation

Press Enter to start installation or ^C to abort
Extracting install data
Please enter new password for SYSDBA user: 1234
Install completed

But the fact that you've set env in profile.local makes me ask - did you use super or classic server?

Alexander Peshkov added a comment - 05/Mar/12 08:06 AM
Paul, I've reproduced a kind of mentioned behavior. With ISC_USER/PASSWORD set globally fbmgr fails to start SS with message:
no permissions to perform operation
And yes - this looks like gsec diag.

Can you confirm that's what cause you problems? Can you send me screenshot of an error?

Paul Reeves added a comment - 06/Mar/12 02:23 PM
Alex, here is the output when I try to install Fb 2.5 SS when ISC_vars are set in profile.local:

--------------------------------------------------------------------------------------------------------------------------
testfb25:/usr/src/tarballs/FirebirdSS-2.5.1.26352-1.amd64 # ./install.sh

Firebird super 2.5.1.26352-0.amd64 Installation

Press Enter to start installation or ^C to abort
Extracting install data
firebird 0:off 1:off 2:on 3:on 4:off 5:on 6:off
Starting Firebird done
Please enter new password for SYSDBA user: masterkey
use gsec -? to get help
Unable to complete network request to host "localhost".
Failed to establish a connection.
unable to open database

Please enter new password for SYSDBA user:

-----------------------------------------------------------------------------------------------------------------


If I comment out the ISC_ vars in profile.local and then run the install script I get this:

-------------------------------------------------------------------------------------------------------------------

testfb25:/usr/src/tarballs/FirebirdSS-2.5.1.26352-1.amd64 # ./install.sh

Firebird super 2.5.1.26352-0.amd64 Installation

Press Enter to start installation or ^C to abort
Extracting install data
firebird 0:off 1:off 2:on 3:on 4:off 5:on 6:off
Starting Firebird done
Please enter new password for SYSDBA user: masterkey
Install completed


---------------------



Alexander Peshkov added a comment - 07/Mar/12 10:41 AM
Trunk does not use fbmgr to start firebird any more, but cleaning that 2 envvars is anyway good idea.