If you are on an intranet wich requires you to log in, you can use cgi variables to log your user in without having to enter a second username and password.
All of this goes right into your Application.cfm file.
<!--- first step is to enable session management (20 minutes) --->
<cfapplication name = "appName" sessionmanagement = "yes" setclientcookies = "yes" sessiontimeout = "#createtimespan(0,0,20,0)#"> <!--- When an invalid user tries to gain access we have to send them to a page that says they do not have access. This cfif will make sure the login code is not run on "invalidUser.cfm", or we would get stuck in a loop. we also check for a session variable called "session.loggedin" to keep this from running every time a valid user requests a page. it will only run if the session does not exists or is false. --->
<cfif not findNoCase("invalidUser.cfm", cgi.SCRIPT_NAME) AND(not isdefined("session.loggedin") OR session.loggedin eq false)> <!--- Now we get the user. I prefer not to save the domain name into the database so I remove it. If you want to save the domain name in the database you don't have to remove it here. cgi.remote_user stores a value similar to domainName\userName. I will use listLast to get the username after the \ --->
<cfset user = listLast(cgi.REMOTE_USER,"\") > <!--- now we run the query to find the user. "networkID" is where the users nt login name is stored --->
<cfquery name="qLogin" datasource="dsn"> SELECT networkID FROM usersTable WHERE networkID = '#user#' </cfquery> <!--- now we check to see if the user was found in the database --->
<cfif qLogin.recordCount> <!--- Set session variables --->