473,396 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 15701
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Boaz Ben-Porat | last post by:
Does anyone knows how to programmaticaly change a user`s password on Windows NT/2K/XP using C# ? Is there a sample code ? TIA Boaz Ben-Porat Milestone A/S Denmark
2
by: Drew Pawlik | last post by:
I am needing to write an application that will be used every month to automatically run queries on an Oracle database. But the password I need to log in to the database needs to be changed every...
1
by: jn148 | last post by:
I administer three IIS6 servers for a large company where the programmers are now requesting that we change the password for the local aspnet user account on the server to a known password (no...
1
by: NWx | last post by:
Hi, I'm an old developer, but didn't used SQL Server or MSDE to much before. I have NetSDK instance of MSDE installed on my PC by Net Framework SDK. All quickstart samples access it using...
0
by: Yannick Béot | last post by:
Hi, I'm trying to make an application that allow a user, through a web form to change its password On a click event, here is the code DirectoryEntry usr = new DirectoryEntry( theUserDN,...
2
by: J | last post by:
Hello. I apologize if this isn't the appropriate group for this question but I was wondering if it's possible to allow regular windows domain users to change their passwords through an .asp page? ...
8
by: marcuu | last post by:
how to change users passwords in VB but not i SQL ?
5
by: Luqman | last post by:
How can Administrator change the Password of existing User, without knowing his Old Password in Administer Security Tool ? One user has forgot his password, and Administer wants to refresh it. ...
0
by: geoharish | last post by:
Dear All, I started using Python just a few days back and there was a requirement of an assigned project to change the user Password through script without user interaction. I could write the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.