Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Your user name and password are not defined when $ character presents in user's password [CORE5544] #5812

Closed
firebird-automations opened this issue May 18, 2017 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Miroslav Djorov (mdjorov)

I was trying to move some clients' databases from a Windows server to new Linux CentOS server. I've created all DB users with their passwords with IBExpert's user manager.
After that I've copied backup files of clients' databases and for one of the databases I've got this error:

gbak: ERROR:Your user name and password are not defined. Ask your database administrator to set up a Firebird login.

At the same time I don't have any problems logging in with the user's name and password with isql-fb. I was trying to restore the databases with this command:

gbak -C -P 8192 -user XXXXX -password n98D$kMS backup.fbk database.fdb

After few tries I think that the problem is with the $ character in the password. I've tried some combinations with these results
Password Result
n98D$kMS Your user name and password are not defined...
n98DkMS working
n98D$k Your user name and password are not defined...
n98Dk working
n98D$ working!!!
$n98D Error message: requires both input and output filenames
"$n98D" Your user name and password are not defined....

At the same time on Windows, Firebird's version 2.5.7.27050 works fine

Installed packages:
firebird.x86_64 2.5.7.27050.0-1.el7 @epel
firebird-filesystem.x86_64 2.5.7.27050.0-1.el7 @epel
firebird-libfbclient.x86_64 2.5.7.27050.0-1.el7 @epel
firebird-libfbembed.x86_64 2.5.7.27050.0-1.el7 @epel
firebird-superserver.x86_64 2.5.7.27050.0-1.el7 @epel

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

That is not firebird error - you should take into an account OS shell behavior. '$' is a special character in linux shell. Take a look:
#⁠ echo n98D$kMS
n98D
Instead $kMS shell substitutes the value of variable kMS which is not set and therefore empty string.
In brief - if you want to use $ in password (or any other parameter) in unix command line put that parameter in single quotes:
#⁠ echo 'n98D$kMS'
n98D$kMS

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @livius2

add apostrophes around password

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant