pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Simple way to manage users with JDBC/Servlets?
3+ messages / 2 participants
[nested] [flat]

* Simple way to manage users with JDBC/Servlets?
@ 2006-07-27 08:44  Peter Neu <peter.neu@gmx.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Peter Neu @ 2006-07-27 08:44 UTC (permalink / raw)
  To: pgsql-jdbc

Hello,

 

I will have to manage a large amount of users with a postgresql db. 

First of all I have to do a major bulk import from a csv file which has this
format:

 

Username;Password;Group

 

Later on I will have to manage all users with a webb app. And give the
possibility

to search and upload new csv files.

 

I already programmed some CRUD applications with Oracle and Java but I'm
looking forward to learn some new

stuff. How would you guys do that?

 

Can the password be auto created by postgresql and converted in md5?

 

My db version 7.4.2

 

Cheers,

Pete  

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Simple way to manage users with JDBC/Servlets?
@ 2006-07-27 09:17  Roland Walter <rwa@mosaic-ag.com>
  parent: Peter Neu <peter.neu@gmx.net>
  0 siblings, 1 reply; 3+ messages in thread

From: Roland Walter @ 2006-07-27 09:17 UTC (permalink / raw)
  To: Peter Neu <peter.neu@gmx.net>; +Cc: pgsql-jdbc

Peter Neu schrieb:
>
>  
>
> Can the password be auto created by postgresql and converted in md5?
>
>  
>
I would try to declare a server side function that generates the 
password from the name and set a default on the password column that 
uses this function.

There is a md5() function declared in PostgreSQL.

It is mentioned in the documentation for 8.1:

http://www.postgresql.org/docs/8.1/interactive/functions-binarystring.html

But not in the documentation for 7.4, but it is there. Tried it on 
7.4.13 with

select md5('admin001')

and got

4eef1e1ea34879a2ae60c60815927ed9

BTW, you should update your database, at least to 7.4.13. Better would 
be 8.1.x.

Regards,
Roland.

-- 
Roland Walter                   mailto: rwa (at) mosaic-ag (dot) com
MOSAIC SOFTWARE AG               phone: +49 (0) 22 25 / 88 2-44 9
Am Pannacker 3                     fax: +49 (0) 22 25 / 88 2-20 1
D-53340 Meckenheim                http://www.mosaic-ag.com



Die in dieser E-Mail enthaltenen Nachrichten und Anhaenge sind ausschliesslich 
fuer den bezeichneten Adressaten bestimmt. Sie koennen rechtlich geschuetzte, 
vertrauliche Informationen enthalten. Falls Sie nicht der bezeichnete Empfaenger
oder zum Empfang dieser E-Mail nicht berechtigt sind, ist die Verwendung,
Vervielfaeltigung oder Weitergabe von Nachrichten und Anhaengen untersagt.
Falls Sie diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte 
unverzueglich den Absender und vernichten Sie die E-Mail.

This e-mail message and any attachment are intended exclusively for the named 
addressee. They may contain confidential information which may also be protected 
by professional secrecy. Unless you are the named addressee (or authorised to
receive for the addressee) you may not copy or use this message or any attachment
or disclose the contents to anyone else. If this e-mail was sent to you by mistake
please notify the sender immediately and delete this e-mail.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Simple way to manage users with JDBC/Servlets?
@ 2006-07-27 09:25  Roland Walter <rwa@mosaic-ag.com>
  parent: Roland Walter <rwa@mosaic-ag.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Roland Walter @ 2006-07-27 09:25 UTC (permalink / raw)
  To: Peter Neu <peter.neu@gmx.net>; +Cc: pgsql-jdbc

Roland Walter schrieb:
> Peter Neu schrieb:
>>
>>  
>>
>> Can the password be auto created by postgresql and converted in md5?
>>
>>  
>>
> I would try to declare a server side function that generates the 
> password from the name and set a default on the password column that 
> uses this function.
>
> There is a md5() function declared in PostgreSQL.
>
> It is mentioned in the documentation for 8.1:
>
> http://www.postgresql.org/docs/8.1/interactive/functions-binarystring.html
>
> But not in the documentation for 7.4, but it is there. 

Bullshit, the documentation is here:

http://www.postgresql.org/docs/7.4/interactive/functions-string.html




-- 
Roland Walter                   mailto: rwa (at) mosaic-ag (dot) com
MOSAIC SOFTWARE AG               phone: +49 (0) 22 25 / 88 2-44 9
Am Pannacker 3                     fax: +49 (0) 22 25 / 88 2-20 1
D-53340 Meckenheim                http://www.mosaic-ag.com



Die in dieser E-Mail enthaltenen Nachrichten und Anhaenge sind ausschliesslich 
fuer den bezeichneten Adressaten bestimmt. Sie koennen rechtlich geschuetzte, 
vertrauliche Informationen enthalten. Falls Sie nicht der bezeichnete Empfaenger
oder zum Empfang dieser E-Mail nicht berechtigt sind, ist die Verwendung,
Vervielfaeltigung oder Weitergabe von Nachrichten und Anhaengen untersagt.
Falls Sie diese E-Mail irrtuemlich erhalten haben, informieren Sie bitte 
unverzueglich den Absender und vernichten Sie die E-Mail.

This e-mail message and any attachment are intended exclusively for the named 
addressee. They may contain confidential information which may also be protected 
by professional secrecy. Unless you are the named addressee (or authorised to
receive for the addressee) you may not copy or use this message or any attachment
or disclose the contents to anyone else. If this e-mail was sent to you by mistake
please notify the sender immediately and delete this e-mail.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-07-27 09:25 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27 08:44 Simple way to manage users with JDBC/Servlets? Peter Neu <peter.neu@gmx.net>
2006-07-27 09:17 ` Roland Walter <rwa@mosaic-ag.com>
2006-07-27 09:25   ` Roland Walter <rwa@mosaic-ag.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox