Skip to main content
Participating Frequently
February 20, 2023
Question

cfntauthenticate not working after moving website to new server

  • February 20, 2023
  • 1 reply
  • 909 views

Hello.

 

I've got a website that uses cfntauthenticate to authenticate users.

It's been working great, but after moving the website to a new server it's suddenly stopped working.

When trying to authenticate, this is the error message I get:

javax.servlet.jsp.JspException: coldfusion.security.BadUserNameException: The user name or group name <username> is invalid in domain <domain>.

The error message sort of makes it seem like there something wonky going on in the connection between the server and the domain controller, but I'm not sure.

 

Old and new server is in the same domain.

Can't find anything related to this in the logs.
It's even working when I develop locally on my laptop.

 

I've tried to do some googling, but haven't really been able to find anything.

Anyone here got any ideas on what the issue could be?

 

(Originally we were using cfldap, but after migrating to using cfldap with starttls, we were seeing intermittent login errors (e.g. your first login would fail, but the second would be successful))

This topic has been closed for replies.

1 reply

BKBK
Community Expert
February 20, 2023

Compare the scenario that works with the one that doesn't, ensuring that:

  1. The username is valid.
  2. You enter the username and domain name in the same way in both scenarios. 
  3.  ColdFusion is running as a user with sufficient rights to authenticate other users in the domain. 
thumboAuthor
Participating Frequently
February 21, 2023
  1. The username is valid - works fine on old server.
  2. Same exact form on both sites.
  3. The same account is running the ColdFusion services on both servers.

 

So I'm a bit lost 😕😕

BKBK
Community Expert
February 24, 2023

It doesn't seem like cfNTauthenticate  is deprecated?

I.e. cfNTauthenticate  != cfauthenticate.


Oh, an oversight of mine. Please ignore. So, cfntauthenticate it is.

 

I have gone back, and have been experimenting with cfntauthenticate, but can't find any pointers yet.

 

What made me think of deprecation is the phrase

<username> is invalid in domain <domain>

 I am assuming that "<username>" and "<domain>" actually occur in the error message. If so, then my guess is that ColdFusion might not even be connecting with Windows Server 2022. Hence the use of default (placeholder) names "domain" and "username". That would imply some kind of disconnection between ColdFusion and Windows Server 2022.