MySQL user databases

Hi all … I’m trying to link my mysql user database with privacyidea, I’ve
manage to connect with the mysql server which tells me that the users has
been found,
but when I go to the users tab at my privacyidea, I cannot see the users or
retrieve any info.
also when I try to add a new users it creates a column on the server but
the data I entered doesn’t appear.
I am using only one table and I am mapping all the attributes which in this
case are: id , username , surname , givenname , email.
I know it must be something silly that I am doing wrong, but I just cannot
get around this.

Hello Andrei,

the “test” button on the resolver configuration only counts the columns
in the specified table.

So probably something with your mapping is not right.

There are several steps to narrow down the problem.

  1. Did you put the resolver into a realm?

  2. look at the attribute mapping in your resolver. Can you please post
    it?

  3. take a look at the logfile privacyidea.log when looking at the users.
    http://privacyidea.readthedocs.org/en/latest/installation/system/logging.html?highlight=debug

  4. Take a look at the resolver definition in the database.
    Table “resolverconfig”

Kind regards
CorneliusAm Freitag, den 30.10.2015, 05:54 -0700 schrieb Andrei Burn:

Hi all … I’m trying to link my mysql user database with privacyidea,
I’ve manage to connect with the mysql server which tells me that the
users has been found,
but when I go to the users tab at my privacyidea, I cannot see the
users or retrieve any info.
also when I try to add a new users it creates a column on the server
but the data I entered doesn’t appear.
I am using only one table and I am mapping all the attributes which in
this case are: id , username , surname , givenname , email.
I know it must be something silly that I am doing wrong, but I just
cannot get around this.

You received this message because you are subscribed to the Google
Groups “privacyidea” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to privacyidea+unsubscribe@googlegroups.com.
To post to this group, send email to privacyidea@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/privacyidea/7ac07144-63f6-4e1c-bb9b-911a5c7969bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Cornelius Kölbel
@cornelinux
+49 151 2960 1417

NetKnights GmbH
http://www.netknights.it
Landgraf-Karl-Str. 19, 34131 Kassel, Germany
Tel: +49 561 3166797, Fax: +49 561 3166798

Amtsgericht Kassel, HRB 16405
Geschäftsführer: Cornelius Kölbel

signature.asc (836 Bytes)

Hi Cornelius!

so this is my mapping “id” : “id”, “username”: “username”, “surname” :
“surname”, “givenname” : “givenname” , “email” : “email” }
another thing I’ve just notice now that when I try to install privacyidea
on my other ubuntu machine I realised that pi-manage.py it’s not working…
when I tried to create a admin it returned the following errors

Traceback (most recent call last):

File “/usr/bin/pi-manage.py”, line 583, in

manager.run()

File “/usr/lib/python2.7/dist-packages/flask_script/init.py”, line
405, in run

result = self.handle(sys.argv[0], sys.argv[1:])

File “/usr/lib/python2.7/dist-packages/flask_script/init.py”, line
384, in handle

return handle(app, *positional_args, **kwargs)

File “/usr/lib/python2.7/dist-packages/flask_script/commands.py”, line
145, in handle

return self.run(*args, **kwargs)

File “/usr/bin/pi-manage.py”, line 85, in add

db.create_all()

File “/usr/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”,
line 895, in create_all

self._execute_for_all_tables(app, bind, 'create_all')

File “/usr/lib/python2.7/dist-packages/flask_sqlalchemy/init.py”,
line 887, in _execute_for_all_tables

op(bind=self.get_engine(app, bind), **extra)

File “/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py”, line 2848,
in create_all

tables=tables)

File “/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line
1478, in _run_visitor

with self._optional_conn_ctx_manager(connection) as conn:

File “/usr/lib/python2.7/contextlib.py”, line 17, in enter

return self.gen.next()

File “/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line
1471, in _optional_conn_ctx_manager

with self.contextual_connect() as conn:

File “/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py”, line
1661, in contextual_connect

self.pool.connect(),

File “/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 272, in
connect

return _ConnectionFairy(self).checkout()

File “/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 431, in
init

rec = self._connection_record = pool._do_get()

File “/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 871, in
_do_get

return self._create_connection()

File “/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 225, in
_create_connection

return _ConnectionRecord(self)

File “/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 318, in
init

self.connection = self.__connect()

File “/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py”, line 379, in
__connect

connection = self.__pool._creator()

File “/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py”,
line 80, in connect

return dialect.connect(*cargs, **cparams)

File “/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py”,
line 283, in connect

return self.dbapi.connect(*cargs, **cparams)

sqlalchemy.exc.OperationalError: (OperationalError) unable to open database
file None NoneOn Friday, October 30, 2015 at 12:54:44 PM UTC, Andrei Burn wrote:

Hi all … I’m trying to link my mysql user database with privacyidea,
I’ve manage to connect with the mysql server which tells me that the users
has been found,
but when I go to the users tab at my privacyidea, I cannot see the users
or retrieve any info.
also when I try to add a new users it creates a column on the server but
the data I entered doesn’t appear.
I am using only one table and I am mapping all the attributes which in
this case are: id , username , surname , givenname , email.
I know it must be something silly that I am doing wrong, but I just cannot
get around this.