Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 22nd, 2004, 01:26 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Question Managing users

Is there a syntax for creating/modifying/deleting database user accounts like: "CREATE USER ....." ?

Reply With Quote
  #2  
Old September 22nd, 2004, 02:07 AM
badukist badukist is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 62 badukist User rank is Corporal (100 - 500 Reputation Level)badukist User rank is Corporal (100 - 500 Reputation Level)badukist User rank is Corporal (100 - 500 Reputation Level)badukist User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 13 h 3 m 18 sec
Reputation Power: 7
Send a message via Yahoo to badukist
Quote:
Originally Posted by SilverDB
Is there a syntax for creating/modifying/deleting database user accounts like: "CREATE USER ....." ?


Nope, but some UDF libraries have such functions

http://rfunc.sourceforge.net/

Reply With Quote
  #3  
Old September 22nd, 2004, 03:55 AM
fikret fikret is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Sarajevo, Bosnia
Posts: 111 fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 h 32 m 11 sec
Reputation Power: 8
Quote:
Originally Posted by SilverDB
Is there a syntax for creating/modifying/deleting database user accounts like: "CREATE USER ....." ?

GSEC is Firebird's command line tool for user administration issues.
All database users are stored in the security database named security.fdb in the Firebird directory. There is at least one user, the system database administrator, SYSDBA.
After installation, the SYSDBA password is "masterkey". (Exception: Firebird 1.5 for Linux)
Only the first 8 characters of a password are significant. The password should not contain space characters.
Invoking GSEC
GSEC can only be run by the SYSDBA.
To use GSEC for the local machine, use:
gsec -user sysdba -password <password> [options]
To use GSEC for a remote machine, use:
gsec -user sysdba -password <password> -database <databasename>
where <databasename> is the database name of the remote security.fdb database.
You can use GSEC has an interactive command line tool or give all commands on one command line.

Examples
Add user Elvis Presley as user ELVIS, password is "Aaron"
gsec -user SYSDBA -password masterkey
GSEC> add elvis -pw Aaron -fname Elvis -lname Presley
GSEC> quit
Change password of user ELVIS to "chuck"
gsec -user SYSDBA -password masterkey
GSEC> modify elvis -pw chuck
GSEC> quit
Change password of SYSDBA from "masterkey" to "MyKey37"
gsec -user SYSDBA -password masterkey -modify sysdba -pw MyKey37
Change password of SYSDBA to "hamburg" on remote Linux server "harry"
gsec -user SYSDBA -password masterkey -database harry:/opt/firebird/security.fdb -modify sysdba -pw hamburg
Change password of SYSDBA on remote Windows server "sally" to "hannover"
gsec -user SYSDBA -password masterkey -database sally:"C:\Program Files\Firebird\security.fdb" -modify sysdba -pw hannover
Change password of SYSDBA on remote server "jake" on TCP port 3051 to "london"
gsec -user SYSDBA -password masterkey -database jake/3051:/opt/firebird/security.fdb" -modify sysdba -pw london
Delete user Joe on local server
gsec -user SYSDBA -password masterkey -delete joe
Notes
On Borland InterBase systems, the security database is named isc4.gdb.
There will be a warning when a new password is longer than 8 characters.

--
Best regards,
Fikret Hasovic http://fikret.fbtalk.net
TAMP R&D Team
FirebirdSQL Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation
JEDI VCS contributor
http://jedivcs.sourceforge.net/

Reply With Quote
  #4  
Old September 22nd, 2004, 07:41 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Lightbulb

Thanks for the replies.

I'm using Delphi+IBObjects and I found a procedure "AlterUser" that does the trick.

Regards,
Silver

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > Managing users


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway