Bug 430025 - Changing password in UI returns a 500 - Internal Server Error
Summary: Changing password in UI returns a 500 - Internal Server Error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-server
Version: 1.0
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: freeipa10 429034
TreeView+ depends on / blocked
 
Reported: 2008-01-24 07:06 UTC by Chandrasekar Kannan
Modified: 2012-03-27 07:13 UTC (History)
5 users (show)

Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-27 07:13:28 UTC
Embargoed:


Attachments (Terms of Use)
use different dictionary to get krbprincipalname (1.47 KB, patch)
2008-01-31 22:40 UTC, Rob Crittenden
no flags Details | Diff

Description Chandrasekar Kannan 2008-01-24 07:06:28 UTC
Ticket #139 (new defect)

Opened 2 months ago
Password policy prevents new users from logging in
Reported by: 	davido 	Assigned to: 	kmacmill
Priority: 	major 	Milestone: 	
Component: 	ipa-server 	Version: 	
Keywords: 	policy 	Cc: 	
Description ΒΆ

    I just created a new user but as soon as I did and the interface

        returned to the View User page, it said "Password has expired".

More info: Obviously enough, I couldn't log in as the new user because of this. When I went back to the server as admin and tried to update the user (by changing the password), I got a "500 - Internal Server Error".

Here's what I can see in the log:

2007-11-30 14:56:10,106 ipagui.controllers ERROR CherryPy? 500 error (500 - Internal Server Error) for request 'POST /user/update' Traceback (most recent call last):

    File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line

105, in _run

    self.main()

    File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line

254, in main

    body = page_handler(*virtual_path, **self.params)

    File "<string>", line 3, in update File "/usr/lib/python2.5/site-packages/turbogears/controllers.py",

line 344, in expose

    *args, **kw)

    File "<string>", line 5, in run_with_transaction File "/usr/lib/python2.5/site-packages/turbogears/database.py", line

312, in so_rwt

    retval = func(*args, **kw)

    File "<string>", line 5, in _expose File "/usr/lib/python2.5/site-packages/turbogears/controllers.py",

line 359, in <lambda>

    mapping, fragment, args, kw)))

    File "/usr/lib/python2.5/site-packages/turbogears/controllers.py",

line 386, in _execute_func

    output = errorhandling.try_call(func, *args, **kw)

    File "/usr/lib/python2.5/site-packages/turbogears/errorhandling.py",

line 72, in try_call

    return func(self, *args, **kw)

    File "<string>", line 3, in update File

"/usr/lib/python2.5/site-packages/turbogears/identity/conditions.py", line 235, in require

    return fn(self, *args, **kwargs)

    File "/usr/share/ipa/ipagui/subcontrollers/user.py", line 520, in update

        rv = client.modifyPassword(kwkrbprincipalname?, "",

kw.get('userpassword')) KeyError?: 'krbprincipalname'

Comment 3 Rob Crittenden 2008-01-31 22:22:37 UTC
This bug has nothing to do with password policy. It is simply a problem with the UI.

Resetting summary.

A more readable stack trace is:

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 105, in
_run
    self.main()
  File "/usr/lib/python2.5/site-packages/cherrypy/_cphttptools.py", line 254, in
main
    body = page_handler(*virtual_path, **self.params)
  File "<string>", line 3, in update
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 336,
in expose
    *args, **kw)
  File "<string>", line 5, in run_with_transaction
  File "/usr/lib/python2.5/site-packages/turbogears/database.py", line 303, in
so_rwt
    retval = func(*args, **kw)
  File "<string>", line 5, in _expose
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 351,
in <lambda>
    mapping, fragment, args, kw)))
  File "/usr/lib/python2.5/site-packages/turbogears/controllers.py", line 378,
in _execute_func
    output = errorhandling.try_call(func, *args, **kw)
  File "/usr/lib/python2.5/site-packages/turbogears/errorhandling.py", line 73,
in try_call
    return func(self, *args, **kw)
  File "<string>", line 3, in update
  File "/usr/lib/python2.5/site-packages/turbogears/identity/conditions.py",
line 235, in require
    return fn(self, *args, **kwargs)
  File
"/home/rcrit/redhat/freeipa/ipa-server/ipa-gui/ipagui/subcontrollers/user.py",
line 521, in update
    rv = client.modifyPassword(kw['krbprincipalname'], "", kw.get('userpassword'))
KeyError: 'krbprincipalname'


Comment 4 Rob Crittenden 2008-01-31 22:40:01 UTC
Created attachment 293660 [details]
use different dictionary to get krbprincipalname

Comment 5 Rob Crittenden 2008-02-01 15:33:03 UTC
Committed in changeset 617

Comment 6 Yi Zhang 2008-04-04 23:19:01 UTC
if it is "admin" who change user's password, it is success
if it is user himself change the password, it has some problems. The bug for
this specific scenario is at bug: 441005
https://bugzilla.redhat.com/show_bug.cgi?id=441005


Note You need to log in before you can comment on or make changes to this bug.