You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Jason D'cruz <ja...@gmail.com> on 2007/11/20 11:43:02 UTC

Changing derby username and password

I'm writing a java application using Derby embedded and network drivers.
Initially i access the database using a default username and password.
How can i change the username and password to access the database?
Or can i create a new user with the same privileges and delete the old one?

Thanks,
Jason
-- 
View this message in context: http://www.nabble.com/Changing-derby-username-and-password-tf4842620.html#a13854508
Sent from the Apache Derby Developers mailing list archive at Nabble.com.


Re: Changing derby username and password

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Jason,

Derby supports 3 ways of managing users. You will have to select one of 
these schemes:

1) Via username/password pairs stored in the database. In this scheme 
you add new users and change passwords with the Derby system procedure 
SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY.

2) Via an external LDAP service. The LDAP service should supply tools 
for configuring users and passwords.

3) Via a customer-coded plugin. Here you write your own scheme for 
managing usernames and passwords.

The short answer to your question is "yes". The long answer is this: how 
you configure users/passwords depends on the authentication scheme you 
have selected. Please see the "Derby and Security" section of the Derby 
Developer's Guide (the link is given below) for more detail on how to 
setup these authentication schemes.

Hope this helps,
-Rick

Jason D'cruz wrote:
> Thanks Rick,
>
> Our requirement is to create a new user or to change the password for an
> existing user.Is that possible?
>
> Regards,
> Jason
>
>
> Rick Hillegas-2 wrote:
>   
>> Jason D'cruz wrote:
>>     
>>> I'm writing a java application using Derby embedded and network drivers.
>>> Initially i access the database using a default username and password.
>>> How can i change the username and password to access the database?
>>> Or can i create a new user with the same privileges and delete the old
>>> one?
>>>
>>> Thanks,
>>> Jason
>>>   
>>>       
>> Hi Jason,
>>
>> There is no way to migrate ownership of schema objects from one user to 
>> another. In particular, there is no way to migrate the ownership of the 
>> database from its creator to another user. However, you may be able to 
>> accomplish much of what you want by GRANTing sufficient privileges to 
>> the new user. You can certainly create new users who are allowed to do 
>> work in the database.
>>
>> For more detail, please see the "Derby and Security" section of the 
>> Derby Developer's Guide: http://db.apache.org/derby/docs/10.3/devguide/
>>
>> Hope this helps,
>> -Rick
>>
>>
>>     
>
>   


Re: Changing derby username and password

Posted by Jason D'cruz <ja...@gmail.com>.
Thanks Rick,

Our requirement is to create a new user or to change the password for an
existing user.Is that possible?

Regards,
Jason


Rick Hillegas-2 wrote:
> 
> Jason D'cruz wrote:
>> I'm writing a java application using Derby embedded and network drivers.
>> Initially i access the database using a default username and password.
>> How can i change the username and password to access the database?
>> Or can i create a new user with the same privileges and delete the old
>> one?
>>
>> Thanks,
>> Jason
>>   
> Hi Jason,
> 
> There is no way to migrate ownership of schema objects from one user to 
> another. In particular, there is no way to migrate the ownership of the 
> database from its creator to another user. However, you may be able to 
> accomplish much of what you want by GRANTing sufficient privileges to 
> the new user. You can certainly create new users who are allowed to do 
> work in the database.
> 
> For more detail, please see the "Derby and Security" section of the 
> Derby Developer's Guide: http://db.apache.org/derby/docs/10.3/devguide/
> 
> Hope this helps,
> -Rick
> 
> 

-- 
View this message in context: http://www.nabble.com/Changing-derby-username-and-password-tf4842620.html#a13946676
Sent from the Apache Derby Developers mailing list archive at Nabble.com.


Re: Changing derby username and password

Posted by Rick Hillegas <Ri...@Sun.COM>.
Jason D'cruz wrote:
> I'm writing a java application using Derby embedded and network drivers.
> Initially i access the database using a default username and password.
> How can i change the username and password to access the database?
> Or can i create a new user with the same privileges and delete the old one?
>
> Thanks,
> Jason
>   
Hi Jason,

There is no way to migrate ownership of schema objects from one user to 
another. In particular, there is no way to migrate the ownership of the 
database from its creator to another user. However, you may be able to 
accomplish much of what you want by GRANTing sufficient privileges to 
the new user. You can certainly create new users who are allowed to do 
work in the database.

For more detail, please see the "Derby and Security" section of the 
Derby Developer's Guide: http://db.apache.org/derby/docs/10.3/devguide/

Hope this helps,
-Rick