[Workaround] LDAP Fallback to DB -> Password failed

Moderator: crythias

Post Reply
catweazle
Znuny advanced
Posts: 121
Joined: 15 Feb 2012, 12:22
Znuny Version: 3.1

[Workaround] LDAP Fallback to DB -> Password failed

Post by catweazle »

Hi

there are two kinds of agents in use (in my OTRS): DB-Agents and LDAP-Agents

It seems LDAP-Auth and LDAP-Sync for LDAP-Agents works fine.

I tested a workaround in case of all LDAP-Servers fail: deaktivating LDAP-Auth and LDAP-Sync in the config to force OTRS to use the DB::Auth.

OTRS using the DB::Auth as fallback as i wanted but something with the password hash in the DB seems wrong :(

user: agentldap

Code: Select all

[Notice][Kernel::System::Auth::DB::Auth] User: agentldap authentication with wrong Pw!!!
there is a password hash for user agentldap in my DB. I think it was created while LDAP-sync in the first place. Maybe my conception is wrong at all?
Last edited by catweazle on 03 Jul 2014, 09:18, edited 1 time in total.
1: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
2: Test: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
3: Test-2: OTRS 3.3.x + Support + MasterSlave @ CentOS 6.5 , MySQL (iphone, idoit-trash)
catweazle
Znuny advanced
Posts: 121
Joined: 15 Feb 2012, 12:22
Znuny Version: 3.1

Re: LDAP Fallback to DB -> Password failed

Post by catweazle »

...maybe anyone know the function how the password for ldap-agents is written into the local DB?

my perl skills are below NULL...
1: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
2: Test: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
3: Test-2: OTRS 3.3.x + Support + MasterSlave @ CentOS 6.5 , MySQL (iphone, idoit-trash)
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: LDAP Fallback to DB -> Password failed

Post by crythias »

catweazle wrote:how the password for ldap-agents is written into the local DB?
it does not
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
catweazle
Znuny advanced
Posts: 121
Joined: 15 Feb 2012, 12:22
Znuny Version: 3.1

Re: LDAP Fallback to DB -> Password failed

Post by catweazle »

crythias wrote:
catweazle wrote:how the password for ldap-agents is written into the local DB?
it does not
once again, you saved me from suffering :)

so my conception failed in the first place, and there is no Fallback option for those agents who have been authentificated via LDAP.

so the password hash created for "ldap agents" ist just a random fill-in?
1: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
2: Test: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
3: Test-2: OTRS 3.3.x + Support + MasterSlave @ CentOS 6.5 , MySQL (iphone, idoit-trash)
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: LDAP Fallback to DB -> Password failed

Post by jojo »

no, as the user types the apassword in the login screen, this is saved in the database on succesful login
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
catweazle
Znuny advanced
Posts: 121
Joined: 15 Feb 2012, 12:22
Znuny Version: 3.1

Re: LDAP Fallback to DB -> Password failed

Post by catweazle »

jojo wrote:no, as the user types the apassword in the login screen, this is saved in the database on succesful login
okay, i am total confused now!

If the password of a agent authentificated by LDAP is saved in the otrs DB, this agent should be able to login after deaktivating ldap authentifikation, shouldn t it?! :?:
1: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
2: Test: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
3: Test-2: OTRS 3.3.x + Support + MasterSlave @ CentOS 6.5 , MySQL (iphone, idoit-trash)
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: LDAP Fallback to DB -> Password failed

Post by crythias »

Does it work? Then the answer is yes. If not, the answer is no.

JoJo says the password that's entered at (successful) login is stored in the database. (the password isn't synced from ldap, but rather stored from user input.)

I'm not so keen on that, but it would likely mean that disabling ldap would allow the last successful stored password to be used for further authentication. If a user has never logged in, this would be useless.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
catweazle
Znuny advanced
Posts: 121
Joined: 15 Feb 2012, 12:22
Znuny Version: 3.1

Re: LDAP Fallback to DB -> Password failed

Post by catweazle »

crythias wrote: JoJo says the password that's entered at (successful) login is stored in the database. (the password isn't synced from ldap, but rather stored from user input.)
Yes, every time a ldap-agent logged in successful, a new password hash is written to the DB.

looks like the password written in the DB never match...
ldap::auth active:

Code: Select all

[Notice][Kernel::System::Auth::DB::Auth] User: ldapagent authentication with wrong Pw!!! 
[Notice][Kernel::System::Auth::DB::Auth] User: ldapagent authentication with wrong Pw!!! 
[Notice][Kernel::System::Auth::LDAP::Auth] User: ldapagent (xxxremovedxxx) authentication ok 
[Notice][Kernel::System::User::UserUpdate] User: ldapagent updated successfully (1)!
[Notice][Kernel::System::User::SetPassword] User: ldapagent changed password successfully!
looks like i have to set up a second auth system for fallback :?
1: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
2: Test: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
3: Test-2: OTRS 3.3.x + Support + MasterSlave @ CentOS 6.5 , MySQL (iphone, idoit-trash)
catweazle
Znuny advanced
Posts: 121
Joined: 15 Feb 2012, 12:22
Znuny Version: 3.1

Re: LDAP Fallback to DB -> Password failed

Post by catweazle »

Found workaround...

In case of LDAP-Server fail:

Deaktivate LDAP::AUTH in config.pm

Let agent use "lost your password" function

agent gets a new password and can login :)
1: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
2: Test: OTRS 3.1.21 + Support + MasterSlave @ CentOS 6.5 , MySQL
3: Test-2: OTRS 3.3.x + Support + MasterSlave @ CentOS 6.5 , MySQL (iphone, idoit-trash)
Post Reply