Issue Details (XML | Word | Printable)

Key: CORE-2534
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: Jim Michaels
Votes: 0
Watchers: 0
Operations

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

gsec change password from command-line gives error

Created: 03/Jul/09 06:01 AM   Updated: 27/Jul/09 12:26 AM
Component/s: GSEC
Affects Version/s: 2.1.3
Fix Version/s: None

Environment:
WIndows XP Pro SP3, Pentium 4 HT (thinks it is dual core), 3GB RAM,
C:\Documents and Settings\Jim>\u\df c f h -a
*C:----------------------------------------********54.44GB/315.58GB (17.25%)
 F:-------------------------------------------*****31.11GB/250.06GB (12.44%)
 H:---------***************************************130.41GB/160.00GB (81.51%)
TOT----------------------------------**************215.96GB/725.63GB (29.76%)
TOT USED: 509.67GB/725.63GB (70.24%)
being used with TurboCASH 4.2.0.2.


 Description  « Hide
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.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jim Michaels added a comment - 03/Jul/09 06:03 AM
changed security level (oops)

Claudio Valderrama C. added a comment - 26/Jul/09 07:00 AM
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).

Jim Michaels added a comment - 27/Jul/09 12:26 AM
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.