By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

how to change user password

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.