Bad hostname after changing LDAP server in Config.pm

Moderator: crythias

Locked
russp
Znuny newbie
Posts: 3
Joined: 20 Jun 2012, 14:31
Znuny Version: 3.0.9
Real Name: Russ Pentecost
Company: Boardex

Bad hostname after changing LDAP server in Config.pm

Post by russp »

Hi guys,
Just to say im new to OTRS, it was installed by someone who has now left my company so ive now taken it on, so forgive me if my info is a little vague and please ask me to provide more if needed.
We have recently decomitioned our old DC, therefore I have repointed all references to the old LDAP host in the config.pm file to our new domain controller. It worked perfectly before so all I have literary changed is all entry's which point to our old LDAP server to the new one. Now we are able to log into the OTRS admin site fine, but when trying to log into the customer site we are getting 'IO::Socket::INET: Bad hostname' as it is still trying to connect to the old LDAP server. Ive scowered every single config file related to OTRS and cannot find any reference to this server anywere except in the config.pm file. So I am guessing that this is still being cached somewere but I have no clue how to clear it if this is the case!

Is anybody able to please help me with this? I have exhausted google and cannot find anyone who has changed their ldap server and had this issue. Please see the below details of my OTRS install. Please let me know if you need any more info, need me to paste config file code etc.

All help will be greatly appreciated.

Thanks


Apache webserver 2.2.19,32 bit
MySQLServer5.5,64-bit
Activestate Perl 5.12.3,32 bit
OTRS 3.0.9
Windows 2008 R2 Standard
Apache webserver 2.2.19 32 bit, MySQL 5.5 64-bit, Activestate Perl 5.12.3 32 bit, OTRS 3.0.9, Windows 2008 R2 Standard
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Bad hostname after changing LDAP server in Config.pm

Post by crythias »

Please check CustomerAuth and CustomerUser settings in Config.pm. Post them if you need to.
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
russp
Znuny newbie
Posts: 3
Joined: 20 Jun 2012, 14:31
Znuny Version: 3.0.9
Real Name: Russ Pentecost
Company: Boardex

Re: Bad hostname after changing LDAP server in Config.pm

Post by russp »

Hi,
The LDAP host values have been changed to reflect the new LDAP server (mdlukdc01.mdlimited.com), but as I say when trying to log into the customer site it is still trying to authenticate to our old ldap server ('mdlukfp03.mdlimited.com') giving the bad hostname error. (this server does not exist anymore) Apache services were restarted after making the change.


$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host1'} = 'mdlukdc01.mdlimited.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN1'} = 'dc=mdlimited,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID1'} = 'sAMAccountName';
#$Self->{'Customer::AuthModule::LDAP::GroupDN1'} = 'cn=Domain Users,cn=Users,dc=mdlimited,dc=com';
#$Self->{'Customer::AuthModule::LDAP::AccessAttr1'} = 'member';
$Self->{'Customer::AuthModule::LDP::AlwaysFilter1'} = '(&(objectclass=user)(mail=*))',
$Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = 'idesk@mdlimited.com';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = '-';


$Self->{CustomerUser1} = {
Name => 'BoardEx LDAP Customers',
Module => 'Kernel::System::CustomerUser::LDAP',
Params => {
# ldap host
Host => 'mdlukdc01.mdlimited.com',
BaseDN => 'dc=mdlimited,dc=com',
SSCOPE => 'sub',
UserDN => 'idesk@mdlimited.com', # Needs to be fully qualified active directory domain name (user at domain.com)
UserPw => '-',
AlwaysFilter => '(&(objectclass=user)(mail=*))',
},
# customer uniq id
CustomerKey => 'sAMAccountName',
# customer #
CustomerID => 'mail',
CustomerUserListFields => ['givenname', 'sn', 'mail'],
CustomerUserSearchFields => ['displayName','sAMAccountName','givenname', 'sn', 'mail','description'],
CustomerUserPostMasterSearchFields => ['displayName','sAMAccountName','givenname','sn','mail','description'],
CustomerUserNameFields => ['givenname', 'sn'],
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type
[ 'UserSalutation', 'Title', 'title', 1, 0, 'var' ],
[ 'UserFirstname', 'Firstname', 'givenname', 1, 1, 'var' ],
[ 'UserLastname', 'Lastname', 'sn', 1, 1, 'var' ],
[ 'UserLogin', 'Login', 'sAMAccountName', 1, 1, 'var' ],
[ 'UserEmail', 'Email', 'mail', 1, 1, 'var' ],
[ 'UserCustomerID', 'CustomerID', 'mail', 0, 1, 'var' ],
[ 'UserPhone', 'Phone', 'telephonenumber', 1, 0, 'var' ],
[ 'UserAddress', 'Address', 'postaladdress', 1, 0, 'var' ],
[ 'UserComment', 'Comment', 'description', 1, 0, 'var' ],
],
};
Apache webserver 2.2.19 32 bit, MySQL 5.5 64-bit, Activestate Perl 5.12.3 32 bit, OTRS 3.0.9, Windows 2008 R2 Standard
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Bad hostname after changing LDAP server in Config.pm

Post by crythias »

all of your entries for Customer say "1" which means to me that someone changed Kernel\Config\Defaults.pm to put your old information. That's not recommended as Defaults.pm gets overwritten on update/upgrade.

Solution: remove "1" and also see what else is modified/customized in defaults.pm and move it to Config.pm
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
russp
Znuny newbie
Posts: 3
Joined: 20 Jun 2012, 14:31
Znuny Version: 3.0.9
Real Name: Russ Pentecost
Company: Boardex

Re: Bad hostname after changing LDAP server in Config.pm

Post by russp »

This is perhaps because it is set up for use across three windows domains? I have pasted all Customerauth lines below if that makes it any clearer:


#------------------------------------------------------#
# BoardEx Customer LDAP Authentication #
#------------------------------------------------------#
$Self->{'Customer::AuthModule1'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host1'} = 'mdlukdc01.mdlimited.com';
$Self->{'Customer::AuthModule::LDAP::BaseDN1'} = 'dc=mdlimited,dc=com';
$Self->{'Customer::AuthModule::LDAP::UID1'} = 'sAMAccountName';
#$Self->{'Customer::AuthModule::LDAP::GroupDN1'} = 'cn=Domain Users,cn=Users,dc=mdlimited,dc=com';
#$Self->{'Customer::AuthModule::LDAP::AccessAttr1'} = 'member';
$Self->{'Customer::AuthModule::LDP::AlwaysFilter1'} = '(&(objectclass=user)(mail=*))',
$Self->{'Customer::AuthModule::LDAP::SearchUserDN1'} = 'idesk@mdlimited.com';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw1'} = '-';

#------------------------------------------------------#
# SHP Customer LDAP Authentication #
#------------------------------------------------------#
$Self->{'Customer::AuthModule2'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host2'} = 'shpappsrv05.shp';
$Self->{'Customer::AuthModule::LDAP::BaseDN2'} = 'dc=shp';
$Self->{'Customer::AuthModule::LDAP::UID2'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN2'} = 'otrs@shp';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw2'} = '-';

#------------------------------------------------------#
# Signet Customer LDAP Authentication #
#------------------------------------------------------#
$Self->{'Customer::AuthModule3'} = 'Kernel::System::CustomerAuth::LDAP';
$Self->{'Customer::AuthModule::LDAP::Host3'} = 'scmfp02.signet.lcl';
$Self->{'Customer::AuthModule::LDAP::BaseDN3'} = 'dc=signet,dc=lcl';
$Self->{'Customer::AuthModule::LDAP::UID3'} = 'sAMAccountName';
$Self->{'Customer::AuthModule::LDAP::SearchUserDN3'} = 'otrs@signet.lcl';
$Self->{'Customer::AuthModule::LDAP::SearchUserPw3'} = '-';
Apache webserver 2.2.19 32 bit, MySQL 5.5 64-bit, Activestate Perl 5.12.3 32 bit, OTRS 3.0.9, Windows 2008 R2 Standard
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Bad hostname after changing LDAP server in Config.pm

Post by crythias »

Please note that the logged information tells you what OTRS thinks it's connecting to.
If you show me things that don't agree with the log, all I can do is agree with you. Did you check Defaults.pm?
russp wrote:when trying to log into the customer site we are getting 'IO::Socket::INET: Bad hostname'
OK, so ... your options:
The domain is misspelled.
The domain is configured in another file (like Defaults.pm)
The OTRS box has a dns problem (for instance, hard-coded /etc/hosts)
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
Locked