Password reset module


#1

I’ve done the most recent updates, now the password reset module doesn’t work.
Password change is fine.

Here’s what i get once i enter the username and click next;
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 locale is incompatible with operating system DETAIL: The database was initialized with LC_COLLATE “en_US.UTF-8”, which is not recognized by setlocale(). HINT: Recreate the database with another locale or install the missing locale.

Any help would be appreciated.


#2

Hey,

sounds like your locale files aren’t up to date. Please run the following as root and paste its output here:

locale-gen

It should output several lines, among them »en_US.UTF-8… done«.

Afterwards you may have to restart several services – or just reboot the server once.

Kind regards,
mosu


#3

Here’s the output

Generating locales (this might take a while)…
en_CA.UTF-8… done
fr_CA.UTF-8… done
Generation complete.

I can see that the password reset is looking for en_us and it’s not there, but it was working fine up untill i did the lates ucs updates.
How do i get it to either go back to en_CA or install the missing locale?

Thanks


#4

Hey,

you have two options here: re-create the database with en_CA.UTF-8 as the locale or configuring the system to enable the en_US.UTF-8 locale.

The former is not a trivial task. It involves dumping all the databases in the current PostgreSQL cluster, saving the cluster configuration, dropping the cluster, re-creating the cluster with en_CA.UTF-8 as the locale, restoring the cluster settings and finally re-importiung the database dump. The advantage is that the cluster will then use the proper settings for collation, date formats, time formats etc. instead of en_US.UTF-8. This is be moot, of course, if en_US.UTF-8 and en_CA.UTF-8 are similar enough in these regards.

The latter is rather easy to achieve. Simply run »dpkg-reconfigure locales«, select all locales you want to have active and they’ll be built for you. Afterwards the aforementioned reboot may be necessary.

Kind regards,
mosu