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

gsec change password from command-line gives error [CORE2534] #2944

Open
firebird-automations opened this issue Jul 3, 2009 · 4 comments
Open

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Jim Michaels (jmichae3)

I followed the obvious instructions within gsec to feed parameters to it from the command-line to change the password.
Either the built-in manual needs to be changed or updated, or the software needs to be fixed. please test.
I would expect it to change the password and quit when I do it from the command-line like this. I absolutely do not want a prompt.
If I want a prompt, I will execute gsec with no arguments.

here is what I executed.

C:\Program Files\Firebird\Firebird_2_1\bin>gsec modify SYSDBA -pw abc12345
invalid parameter, no switch defined
error in switch specifications
GSEC> ?

gsec utility - maintains user password database

command line usage:
gsec [ <options> ... ] <command> [ <parameter> ... ]

interactive usage:
gsec [ <options> ... ]
GSEC>
<command> [ <parameter> ... ]

available options:
-user <database administrator name>
-password <database administrator password>
-role <database administrator SQL role name>
-trusted (use trusted authentication)
-database <database to manage>
-z

available commands:
adding a new user:
add <name> [ <parameter> ... ]
deleting a current user:
delete <name>
displaying all users:
display
displaying one user:
display <name>
modifying a user's parameters:
modify <name> <parameter> [ <parameter> ... ]
help:
? (interactive only)
help
displaying version number:
z (interactive only)
quit interactive session:
quit (interactive only)

available parameters:
-pw <password>
-uid <uid>
-gid <uid>
-fname <firstname>
-mname <middlename>
-lname <lastname>

GSEC> quit

please fix. it would be nice to be able to write an Auto-It3 GUI utility to call this from the command-line to change the password during setup. call it chdbapw.

I have not tested the other commands from the command-line to see if they work, since mine is a production db.

@firebird-automations
Copy link
Collaborator Author

Commented by: Jim Michaels (jmichae3)

changed security level (oops)

@firebird-automations
Copy link
Collaborator Author

Modified by: Jim Michaels (jmichae3)

security: Managers [ 10013 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Claudio Valderrama C. (robocop)

The command is
gsec -modify SYSDBA -pw abc12345 -user sysdba -pass <current_sysdb_pw>

Notice the hyphen in front of "modify" and the usage of the superuser; otherwise it will tell you the user cannot be found (really, no privileges to scan the users table in the security db).

@firebird-automations
Copy link
Collaborator Author

Commented by: Jim Michaels (jmichae3)

gsec:
the internal documentation of gsec does not say that modify must have a - in front of it.
modifying a user's parameters:
modify <name> <parameter> [ <parameter> ... ]

no indication is given that the command-line version is any different. please fix? maybe say something like
modifying a user's parameters:
modify <name> <parameter> [ <parameter> ... ] (from command-line: -modify <name> <parameter> [ <parameter> ... ])

or better yet, use both variations of the command (uses both modify and -modify) and route it to the same place so existing code base of your users doesn't break. it's not hard to parse that. difference is just an extra string comparison really.

it keeps your on-screen documentation to a screenful.

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