473,498 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing User Password - Credential Problem

I'm trying to change a user's password using objUser.Invoke("setPassword",
"newpassword")

It works fine as a console application if I'm logged in with someone with
the correct permissions. If I'm logged in as a normal user it doesn't work,
even though call before that,

objUser.Username = "ad***@domain.com"
objUser.Password = "adminpassword"

Obviously the ASP.NET account doesn't have permissions to change passwords
so how can I escalate my permissions for this one task?

-
Steve Evans
Email Services
SDSU Foundation
Nov 18 '05 #1
4 2317
you should have the user pass the old password, then impersonate them, then
change password to new password., otherwise you need to impersonate a domain
admin
-- bruce (sqlwork.com)
"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:eC**************@tk2msftngp13.phx.gbl...
I'm trying to change a user's password using objUser.Invoke("setPassword",
"newpassword")

It works fine as a console application if I'm logged in with someone with
the correct permissions. If I'm logged in as a normal user it doesn't work, even though call before that,

objUser.Username = "ad***@domain.com"
objUser.Password = "adminpassword"

Obviously the ASP.NET account doesn't have permissions to change passwords
so how can I escalate my permissions for this one task?

-
Steve Evans
Email Services
SDSU Foundation

Nov 18 '05 #2
This is for admins to reset users forgotten passwords, etc. So I don't know
the existing password of the account.

How can I impersonate another account? Preferably how do I get it to
execute under the context of the user that logged into IIS (it's protected
with basic authentication)

--

Steve Evans
Email Services
SDSU Foundation
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
you should have the user pass the old password, then impersonate them, then change password to new password., otherwise you need to impersonate a domain admin
-- bruce (sqlwork.com)
"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:eC**************@tk2msftngp13.phx.gbl...
I'm trying to change a user's password using objUser.Invoke("setPassword", "newpassword")

It works fine as a console application if I'm logged in with someone with the correct permissions. If I'm logged in as a normal user it doesn't

work,
even though call before that,

objUser.Username = "ad***@domain.com"
objUser.Password = "adminpassword"

Obviously the ASP.NET account doesn't have permissions to change passwords so how can I escalate my permissions for this one task?

-
Steve Evans
Email Services
SDSU Foundation


Nov 18 '05 #3
ASP.NET application for impersonate an account (if IIS have not Anonimous
access) must have a key in Web.Config. This key is Impersonate and the value
must be true.
In this way ASP.NET application have your permission on the machine and I
think that you can do what you want. User property of ASP.NET page can help
you for know logged user.

Brun

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
This is for admins to reset users forgotten passwords, etc. So I don't know the existing password of the account.

How can I impersonate another account? Preferably how do I get it to
execute under the context of the user that logged into IIS (it's protected
with basic authentication)

--

Steve Evans
Email Services
SDSU Foundation
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
you should have the user pass the old password, then impersonate them,

then
change password to new password., otherwise you need to impersonate a

domain
admin
-- bruce (sqlwork.com)
"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:eC**************@tk2msftngp13.phx.gbl...
I'm trying to change a user's password using objUser.Invoke("setPassword", "newpassword")

It works fine as a console application if I'm logged in with someone with the correct permissions. If I'm logged in as a normal user it doesn't

work,
even though call before that,

objUser.Username = "ad***@domain.com"
objUser.Password = "adminpassword"

Obviously the ASP.NET account doesn't have permissions to change passwords so how can I escalate my permissions for this one task?

-
Steve Evans
Email Services
SDSU Foundation



Nov 18 '05 #4
ASP.NET application for impersonate an account (if IIS have not Anonimous
access) must have a key in Web.Config. This key is Impersonate and the value
must be true.
In this way ASP.NET application have your permission on the machine and I
think that you can do what you want. User property of ASP.NET page can help
you for know logged user.

Brun

"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
This is for admins to reset users forgotten passwords, etc. So I don't know the existing password of the account.

How can I impersonate another account? Preferably how do I get it to
execute under the context of the user that logged into IIS (it's protected
with basic authentication)

--

Steve Evans
Email Services
SDSU Foundation
"bruce barker" <no***********@safeco.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
you should have the user pass the old password, then impersonate them,

then
change password to new password., otherwise you need to impersonate a

domain
admin
-- bruce (sqlwork.com)
"- Steve -" <se****@foundation.sdsu.edu> wrote in message
news:eC**************@tk2msftngp13.phx.gbl...
I'm trying to change a user's password using objUser.Invoke("setPassword", "newpassword")

It works fine as a console application if I'm logged in with someone with the correct permissions. If I'm logged in as a normal user it doesn't

work,
even though call before that,

objUser.Username = "ad***@domain.com"
objUser.Password = "adminpassword"

Obviously the ASP.NET account doesn't have permissions to change passwords so how can I escalate my permissions for this one task?

-
Steve Evans
Email Services
SDSU Foundation



Nov 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2398
by: Jason Jodon | last post by:
I am trying to change the value of the Qty field in this cXML stream to reflect the value the user enters in the Qty field. Our programmer showed me this in XML using Microsoft.XMLDOM, but the...
0
241
by: dee | last post by:
Hi, This might be a very simple one but I havn't been able to get it working. I have Impersonate to be ON in web.config file. I have sections of application that impersonate as someone other and...
10
9834
by: Fabrizio | last post by:
(Sorry for the crosspost, but I really don't know which is the right newsgroup!) Hi all, I try to change the password to a user that as to change the password at first logon: try {
3
273
by: - Steve - | last post by:
I'm trying to change a user's password using objUser.Invoke("setPassword", "newpassword") It works fine as a console application if I'm logged in with someone with the correct permissions. If...
0
1081
by: Hari potter | last post by:
Hi all, I have an asp.net website that references some dlls. The web site has been configured to use anonymous access(with windows credential user name and password) and also Windows...
9
15476
by: webrod | last post by:
Hi all, how can I check a user/password in a LDAP ? I don't want to connect with this user, I would like to connect to LDAP with a ADMIN_LOG/ADMIN_PWD, then do a query to find the user and...
2
1361
by: sweetpotatop | last post by:
Hi, I wonder how can I get the window/network credential from the user machine thru' ASP.NET? I have been using LDAP, however, the user will be prompted for username and password at least...
0
7125
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
7002
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
7165
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
7205
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
7379
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...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4590
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.