自带帮助命令为:
C:\Users\Administrator>gsec -?
gsec utility - maintains user password database
command line usage:
gsec [ ... ] [ ... ]
interactive usage:
gsec [ ... ]
GSEC>
[ ... ]
available options:
-user
-password
-fetch_password
-role
-trusted (use trusted authentication)
-database
-z
available commands:
adding a new user:
add [ ... ]
deleting a current user:
delete
displaying all users:
display
displaying one user:
display
modifying a user's parameters:
modify [ ... ]
changing admins mapping to RDB$ADMIN role in security database:
mapping {set|drop}
help:
? (interactive only)
help
displaying version number:
z (interactive only)
quit interactive session:
quit (interactive only)
available parameters:
-pw
-uid
-gid
-fname
-mname
-lname
-admin {yes|no}
gsec是Firebird数据库的用户密码管理工具.
命令行用法:
gsec [ <options> ... ] <command> [ <parameter> ... ]
交互用法:
gsec [ <options> ... ]
GSEC>
<command> [ <parameter> ... ]
可用选项:
-user <数据库管理员用户名>
-password <数据库管理密码>
-role <数据库管理员SQL权限名称>
-trusted (使用信任认证)
-database <管理的数据库>
-z (显示当前版本号)
可用命令:
增加一个新用户:
add <name> [ <parameter> ... ]
删除当前用户:
delete <name>
列出所有用户:
display
显示一个用户:
display <name>
修改用户参数:
modify <name> <parameter> [ <parameter> ... ]
help:
? (interactive only)
help
显示版本号:
z (仅在交互模式下)
退出:
quit (仅在交互模式下)
可用参数:
-pw <password>
-uid <uid>
-gid <uid>
-fname <firstname>
-mname <middlename>
-lname <lastname>
例子:
1. 增加一个用户
add yokoboy -pw 1723;
2. 查看当前用户
GSEC> display
user name uid gid admin full name
------------------------------------------------------------------------------------------------
SYSDBA 0 0 Sql Server Administrator
YOKOBOY 0 0
3. 修改用户名密码
GSEC> modify sysdba -pw 1723;
GSEC> display
user name uid gid admin full name
------------------------------------------------------------------------------------------------
SYSDBA 0 0 Sql Server Administrator
YOKOBOY 0 0
修改之后默认侧用户名密码就无法登陆进行管理了!
C:\Users\Administrator>gsec -user sysdba -password masterkey;
use gsec -? to get help
Your user name and password are not defined. Ask your database administrator to set up a Firebird login.
unable to open database
下面例子例子(没有亲手验证):来源于http://firebird.net.cn/forum_view.asp?forum_id=4&view_id=52
添加用户
gsec -user sysdba -password masterkey
gsec> add elvis -pw elvis -fname elvis -lnmae presley
修改用户密码
gsec> modify elvis -pw chunk
修改sysdba密码
gsec -user sysdba -password masterkey -modify sysdba -pw mykey37
修改远程服务器linux的sysdba密码
gsec -user sysdba -password masterkey -database harry:/opt/firebird/security.fbd -modify sysdba -pw hamburg
修改远程服务器windows的sysdba密码
gsec -user sysdba -password masterkey -database sally:"c:\Program files\Firebird\security.fdb" -modify sysdba -pw hannover
修改远程服务器使用tcp port 3050
gsec -user sysdba -password masterkey -database jack/3050:/opt/firebird/security.fdb" -modify sysdba -pw londo
修改遠端windows伺服器ip( a.b.c.d)使用tcp port 3050
修改远程windows服务器ip( a.b.c.d)使用tcp port 3050
gsec -user sysdba -password masterkey -database a.b.c.d/3050:"c:\program files\firebird\firebird_1_5\security.fdb -modiyf sysdba -pw londo
删除本地使用者
gsec -user sysdba -password masterkey -delete joe