Self service password reset not working

SELF SERVICE PASSWORD RESET NOT WORKING

It shows below shown error

Traceback (most recent call last): 
File "/usr/lib/pymodules/python2.7/univention/management/console/protocol/modserver.py", line 271, in handle
  self.__handler.init() 
File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/__init__.py", line 190, in init
  self.db = TokenDB(MODULE) 
File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 53, in __init__
  self.conn = self.open_db()
File "/usr/lib/pymodules/python2.7/univention/management/console/modules/passwordreset/tokendb.py", line 120, in open_db 
  db_name=DB_NAME, db_user=DB_USER, db_pw=password)) 
File "/usr/lib/python2.7/dist-packages/psycopg2/__init__.py", line 179, in connect 
  connection_factory=connection_factory, async=async) 
OperationalError: FATAL: database "selfservice" does not exist

Kindly help.

UCS version is latest and attached is the error screenshot too

Hello,

not easy to know what happened without some more information. First I’d verify that the selfservice packages were properly installed, especially their so-called ‘join scripts’. Either on command line, issue

univention-check-join-status

or in the web administration frontend, open the ‘domain join’ module and check if it states ‘something to do’.

And please include some more details that could be influental; on whith server role did you experience this behaviour; is it about an administrative or a normal user; and anything more you’d believe to be important.

Thanks and regards,
Frank Greif.

Sorry for the delay.

And after univention-check-join-status it says successfully joined.

I tried both like administrators and normal users too but it throws the same error.

And error occurs when you goto /univention-self-service/?lang=en-US#passwordreset -> enter username and press next.

Just to give you some more info it behaves the same way when i goto this page (/univention-self-service/?lang=en-US#setcontactinformation) enter details and press next

The database is created when the App is installed - but only at the first installation time. So you’ll have to uninstall the app, then remove the packages completely and then reinstall the app.
Here are the commands:

univention-app remove self-service
apt-get purge univention-self-service univention-self-service-passwordreset-umc
univention-app install self-service

If it isn’t fixed after that, please copy and paste the complete output of the three commands above here.

Thank you for the quick response. I really appreciate that… And about the topic i uninstalled installed it atleast 3 times now it didn’t work from the start but yeah everytime i did it through app center not from command line… Will do it through command line tommorow morning…

Cheers!

Hi,

yes, give it a try. The App Center doesn’t do the purge that @troeder suggested , only a remove.
"remove" uninstalls the packages, but keeps the configuration files, just in case. “purge” also wipes the configurations files.

It is still not happed but got clue for you guys i guess.

Fresh installation... ERROR: role "selfservice" already exists createdb: database creation failed: ERROR: encoding UTF8 does not match locale en_IN DETAIL: The chosen LC_CTYPE setting requires encoding LATIN1. Using old DB password... Restarting memcached: memcached_univention_saml. Restarting memcached: memcached_univention-self-service. Calling joinscript 35univention-self-service-passwordreset-umc.inst ... 2017-03-29 18:58:19.994814597+05:30 (in joinscript_init) Joinscript 35univention-self-service-passwordreset-umc.inst finished with exitco de 1

It says near the end of the installation on cmd terminal

Searching the net for “ERROR: encoding UTF8 does not match locale” gives the hint that there is a problem with the locale settings on the system. It might well be that there is a problem using en_IN in conjunction with postgres. I am not sure if there are test cases in Univention QA for all combinations of locales and software packages.
I would uninstall postgresql (if there are no other databases of course), switch to en_US at least for the time of installation and try again.

hth,
Dirk

I can’t take risk of changing locale. It is on hardcore production. Any other way?

Reproduced, see http://forge.univention.org/bugzilla/show_bug.cgi?id=44201

Hello,

What is the output of:
ucr get locale/default

Should be:
en_IN.UTF-8:UTF-8

What is the output of:
egrep -v ^# /etc/locale.gen /etc/default/locale

Should be:

/etc/locale.gen:en_IN.UTF-8 UTF-8
/etc/locale.gen:en_US.UTF-8 UTF-8
/etc/default/locale:LANG=en_IN.UTF-8

Output

root@domain:~# ucr get locale/default en_IN:ISO-8859-1 root@domain:~# egrep -v ^# /etc/locale.gen /etc/default/locale /etc/locale.gen: /etc/locale.gen: /etc/locale.gen:en_IN ISO-8859-1 /etc/locale.gen:en_US.UTF-8 UTF-8 /etc/locale.gen:de_DE.UTF-8 UTF-8 /etc/locale.gen:C UTF-8 /etc/locale.gen: /etc/default/locale: /etc/default/locale:LANG=en_IN /etc/default/locale:

For this kind of work, you should clone the server and run it in a test environment.

This must be changed:
ucr set locale/default=en_IN.UTF-8:UTF-8

Then rerun the join script:
univention-run-join-scripts --run-scripts --force 35univention-self-service-passwordreset-umc.inst

I guess you can change the locale back after that - not sure though. Nowadays you’d want all UTF-8 anyway.

1 Like
Mastodon