Subject | RE: [firebird-support] Modifying password with gsec |
---|---|
Author | Alan McDonald |
Post date | 2008-08-28T02:36:48Z |
> However, on the main PC I use it has Firebird 1.5.1 installed. In thisthis script will do it:
> version of Firebird, you cannot change your own password. Can I ask if
> there
> are any workarounds for this? If not, it is not too much of a problem.
>
SET AUTODDL ON;
/* Create Exception... */
CREATE EXCEPTION E_NO_RIGHT 'You have no rights to modify this user';
/* Create trigger... */
SET TERM ^ ;
CREATE TRIGGER USERS_BU0 FOR USERS
ACTIVE BEFORE UPDATE POSITION 0
AS
begin
IF (NOT (USER='SYSDBA' OR USER=OLD.USER_NAME)) THEN
EXCEPTION E_NO_RIGHT;
end
^
/* Create(Add) Crant */
SET TERM ; ^
GRANT UPDATE (FIRST_NAME, GID, GROUP_NAME, LAST_NAME, MIDDLE_NAME, PASSWD,
UID) ON USERS TO PUBLIC;