468,257 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,257 developers. It's quick & easy.

how to change user password

Newbie, looking at DB2 on AS400 iSeries, on Windows network. I have
read that users are authenticated at the OS level, not at the database
level.

How do I make it possible for users to change their passwords on their
own? I have been trying to use the CONNECT command, but I'm getting
nowhere. When I run the following command:

CONNECT TO dbname USER username USING 'pwd'

that resolves, but when I try this:

CONNECT TO dbname USER username USING 'pwd' NEW 'newpwd' CONFIRM
'newpwd'

then I get an error message saying that NEW was not expected. What
would cause that?

Is there any way to test this command directly within the Run SQL
Script tool? I see it's to be used when first connecting .. just
wondering.

My goal here is to have a webpage or small GUI that the users can
access, type in their old and new passwords, press a button, and
expect that the password will be modified. Surely this isn't rocket
science .. it's almost trivial in MS SQL Server .. so I figure I'm
missing something, probably something obvious, and I ask for your
assistance.

Thank you.

Aug 20 '07 #1
1 13371
Oliver wrote:
Newbie, looking at DB2 on AS400 iSeries, on Windows network. I have
read that users are authenticated at the OS level, not at the database
level.

How do I make it possible for users to change their passwords on their
own? I have been trying to use the CONNECT command, but I'm getting
nowhere. When I run the following command:

CONNECT TO dbname USER username USING 'pwd'

that resolves, but when I try this:

CONNECT TO dbname USER username USING 'pwd' NEW 'newpwd' CONFIRM
'newpwd'

then I get an error message saying that NEW was not expected. What
would cause that?

Is there any way to test this command directly within the Run SQL
Script tool? I see it's to be used when first connecting .. just
wondering.

My goal here is to have a webpage or small GUI that the users can
access, type in their old and new passwords, press a button, and
expect that the password will be modified. Surely this isn't rocket
science .. it's almost trivial in MS SQL Server .. so I figure I'm
missing something, probably something obvious, and I ask for your
assistance.
As you've discovered, NEW and CONFIRM are not supported clauses:
http://publib.boulder.ibm.com/infoce...fzmstconj1.htm

Since authentication is part of the OS, one thought (if you must do this
via an SQL interface) would be to create a stored procedure that calls
the Change User Password API:
http://publib.boulder.ibm.com/infoce...s/QSYCHGPW.htm

--
Karl Hanson
Aug 20 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Boaz Ben-Porat | last post: by
2 posts views Thread by Drew Pawlik | last post: by
reply views Thread by Yannick Béot | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.