Using Windows Authentication with Microsoft SQL Server

KB Home   |   Using Windows Authentication with Microsoft SQL Server

Main.SQLServerWindowsAuthentication History

Hide minor edits - Show changes to output

Changed lines 11-20 from:
!! 1. SQL Server configuration

SQL Server must first be configured to allow Windows authentication.  This is configured within the SQL Server administration tools.

You will also need to grant the "papercut_svc" user full access to the PaperCut database (e.g. full access to read/updated tables and also to create and drop database tables.

\\

!! 2
. Configure PaperCut to use SQL Server
to:
!!1. Configure PaperCut to use SQL Server
Changed lines 21-22 from:
!! 3. Running the PaperCut Application Server as a non-system account
to:
!!2. Running the PaperCut Application Server as a non-system account
Changed lines 33-34 from:
!! 4. Additional steps for PaperCut 11.4 and earlier
to:
!!3. SQL Server configuration

SQL Server must first be configured to allow Windows authentication.  This is configured within the SQL Server administration tools.

You will also need to grant the "papercut_svc" user full access to the PaperCut database (e.g. full access to read/updated tables and also to create and drop database tables.

\\

!!
4. Additional steps for PaperCut 11.4 and earlier
Changed lines 58-59 from:
!! 5. Configure PaperCut for SQL Server Windows authentication
to:
!!5. Configure PaperCut for SQL Server Windows authentication
Changed lines 9-11 from:

!! Configure PaperCut to use SQL Server
to:
\\

!! 1. SQL Server configuration

SQL Server must first be configured to allow Windows authentication.  This is configured within the SQL Server administration tools.

You will also need to grant the "papercut_svc" user full access to the PaperCut database (e.g. full access to read/updated tables and also to create and drop database tables.

\\

!! 2.
Configure PaperCut to use SQL Server
Changed lines 27-29 from:

!! Running the PaperCut Application Server as a non-system account
to:
\\

!! 3. Running the PaperCut Application Server as a non-system account
Changed lines 33-50 from:
1. Create a domain user account to run the PaperCut Application Server service.  It is recommended to name the user something like "papercut_svc".  Ensure that the user is configured so their password never expires.  Also ensure that the user has local administrator privileges on the server running PaperCut.

2. Change the PaperCut Application Server service to run as the "papercut_svc" user.  To do this select the "PaperCut Application Server" service in the Windows service tool (Control Panel->Admin Tools->Services), then right-click and select 'Properties'.  On the "Logon" tab enter the username/password of the new papercut user.  Press 'OK' to apply the changes.

3. Restart the PaperCut Application Server service using the service control panel.  Wait for the service to start and test that PaperCut is operating correctly by logging into the admin interface.
 

!! SQL Server configuration

SQL Server must first be configured to allow Windows authentication.  This is configured within the SQL Server administration tools.

You will also need to grant the "papercut_svc" user full access to the PaperCut database (e.g. full access to read/updated tables and also to create and drop database tables.


!! Configuring PaperCut to use SQL Server's Windows Authentication

1. First you will need to download
the jTDS SQL Server database driver package.  This contains some `DLLs required to use Windows Authentication with SQL Server.  This can be downloaded from the jTDS project at the link below:
to:
'''3.1.''' Create a domain user account to run the PaperCut Application Server service.  It is recommended to name the user something like "papercut_svc".  Ensure that the user is configured so their password never expires.  Also ensure that the user has local administrator privileges on the server running PaperCut.

'''3.2.''' Change the PaperCut Application Server service to run as the "papercut_svc" user.  To do this select the "PaperCut Application Server" service in the Windows service tool (Control Panel->Admin Tools->Services), then right-click and select 'Properties'.  On the "Logon" tab enter the username/password of the new papercut user.  Press 'OK' to apply the changes.

'''3.3.''' Restart the PaperCut Application Server service using the service control panel.  Wait for the service to start and test that PaperCut is operating correctly by logging into the admin interface.

\\

!! 4. Additional steps for PaperCut 11.4 and earlier

'''Skip this section if you are running PaperCut 11.5 or newer''' (and continue with ''Configure PaperCut for SQL Server Windows authentication'')

'''4.1.''' PaperCut versions 11.4 and earlier require an additional download:
the jTDS SQL Server database driver package.  This contains some `DLLs required to use Windows Authentication with SQL Server.  This can be downloaded from the jTDS project at the link below:
Changed lines 49-55 from:

2. Save and extract the jtds-1.2.5-dist.zip file to the server running PaperCut.

3. Copy the @@ntlmauth.dll@@ into PaperCut under the directory: @@[app-path]\server\bin\win\lib@@   (i.e. in the same directory as the @@wrapper.dll@@).  '''IMPORTANT:''' If you are running the PaperCut 64-bit addon-pack you must use the @@ntlmauth.dll@@ from the @@x64\SSO@@ directory.  If not using the 64-bit add-on pack, use the DLL from the @@x86\SSO@@ directory. 

3. Open
the PaperCut @@server.properties@@ file in a text editor.  The connection settings need to be changed to remove the username/password.  The username must be blank otherwise the "SQL Server" authentication will be used.  Edit the server.properties file so the  @@database.username@@ is set to empty.  e.g.
to:
'''4.2.''' Save and extract the @@jtds-1.2.5-dist.zip@@ file to the server running PaperCut.

'''4.3.''' Copy the @@x86\SSO\ntlmauth.dll@@ file into PaperCut under the directory: @@[app-path]\server\bin\win\lib@@ (i.e. in the same directory as @@wrapper.dll@@).

'''4.4.''' '''If you are running the PaperCut 64-bit add-on pack''' ''(if you have not installed the 64-bit add-on pack, skip this step)'', you must ALSO copy the @@x64\SSO\ntlmauth.dll@@ file into PaperCut under the directory: @@[app-path]\server\bin\win\lib64@@ (you will need to create the @@lib64@@ directory).  Then edit the file at @@[app-path]\server\bin\win\win64.conf@@ and add the following line to the end of the file:
-->[
@wrapper.java.library.path.1=bin/win/lib64@]

\\

!! 5. Configure PaperCut for SQL Server Windows authentication

'''5.1.''' Open the PaperCut @@[app-path]\server\server.properties@@ file in a text editor.  The connection settings need to be changed to '''remove the username''' (and password).  If the username is not blank, "SQL Server" authentication will be used instead.  Edit the server.properties file so that @@database.username@@ is empty.  E.g.:

Changed lines 64-70 from:
Save the configuration file.

4
. Restart the PaperCut Application Server service using the service control panel (Control Panel->Admin Tools->Services).

Test that PaperCut is working correctly by logging into the PaperCut admin interface.

to:
'''5.2.''' Save the configuration file.

'''5.3.''' Restart the
service @@PaperCut Application Server@@ using the service control panel (Control Panel->Admin Tools->Services).

'''5.4.''' Test that PaperCut is working correctly by logging into the PaperCut admin interface.
Changed line 71 from:
''Categories:'' [[!Databases]], [[!Architecture]]
to:
''Categories:'' [[Category.Databases|+]], [[Category.Architecture|+]]
Changed line 73 from:
[-keywords: Microsoft SQL Server, Integrated Authentication, Windows Authentication -]
to:
[-Keywords: Microsoft SQL Server, Integrated Authentication, Windows Authentication-]
June 06, 2011, at 12:21 PM by 124.168.114.234 -
Changed lines 58-59 from:
TODO link your page here: https://www.papercut.com/kb/Main/Miscellaneous
to:
June 06, 2011, at 12:19 PM by 124.168.114.234 -
Added lines 1-63:
(:title Using Windows Authentication with Microsoft SQL Server :)

By default PaperCut can use SQL authentication by configuring the database username and password in the PaperCut @@server.properties@@ file.  This is discussed in the manual [[https://www.papercut.com/products/ng/manual/ch-ext-db-upsizing.html | here]].  The @@server.properties@@ file is secured by only being accessible by Administrator users.

Some customers prefer to make use of the Windows Authentication features of SQL Server.  This allows PaperCut to automatically login/connect to the database using the credentials of the user the "PaperCut Application Server" is running as.  This avoids the need to store the username/password in the @@server.properties@@ file.

To use Windows Authentication with SQL server some additional configuration is required.


!! Configure PaperCut to use SQL Server

It is generally recommended to configure PaperCut to first use SQL Server authentication and confirm everything is working before moving to use "Windows Authentication".  The Windows Authentication is more complicated to setup, so it's good to get things working first with SQL Authentication.

To do this follow the [[https://www.papercut.com/products/ng/manual/ch-ext-db-upsizing.html | upsizing guide in the PaperCut manual]].

After completing this you should have PaperCut running using the SQL Server database.


!! Running the PaperCut Application Server as a non-system account

By default the PaperCut Application Server runs as the SYSTEM account.  You need to change PaperCut to run under a user account that is granted permissions to the SQL Server database.

1. Create a domain user account to run the PaperCut Application Server service.  It is recommended to name the user something like "papercut_svc".  Ensure that the user is configured so their password never expires.  Also ensure that the user has local administrator privileges on the server running PaperCut.

2. Change the PaperCut Application Server service to run as the "papercut_svc" user.  To do this select the "PaperCut Application Server" service in the Windows service tool (Control Panel->Admin Tools->Services), then right-click and select 'Properties'.  On the "Logon" tab enter the username/password of the new papercut user.  Press 'OK' to apply the changes.

3. Restart the PaperCut Application Server service using the service control panel.  Wait for the service to start and test that PaperCut is operating correctly by logging into the admin interface.
 

!! SQL Server configuration

SQL Server must first be configured to allow Windows authentication.  This is configured within the SQL Server administration tools.

You will also need to grant the "papercut_svc" user full access to the PaperCut database (e.g. full access to read/updated tables and also to create and drop database tables.


!! Configuring PaperCut to use SQL Server's Windows Authentication

1. First you will need to download the jTDS SQL Server database driver package.  This contains some `DLLs required to use Windows Authentication with SQL Server.  This can be downloaded from the jTDS project at the link below:

-->http://sourceforge.net/projects/jtds/files/jtds/1.2.5/jtds-1.2.5-dist.zip/download


2. Save and extract the jtds-1.2.5-dist.zip file to the server running PaperCut.

3. Copy the @@ntlmauth.dll@@ into PaperCut under the directory: @@[app-path]\server\bin\win\lib@@  (i.e. in the same directory as the @@wrapper.dll@@).  '''IMPORTANT:''' If you are running the PaperCut 64-bit addon-pack you must use the @@ntlmauth.dll@@ from the @@x64\SSO@@ directory.  If not using the 64-bit add-on pack, use the DLL from the @@x86\SSO@@ directory. 

3. Open the PaperCut @@server.properties@@ file in a text editor.  The connection settings need to be changed to remove the username/password.  The username must be blank otherwise the "SQL Server" authentication will be used.  Edit the server.properties file so the  @@database.username@@ is set to empty.  e.g.

-->@@database.username=@@

Save the configuration file.

4. Restart the PaperCut Application Server service using the service control panel (Control Panel->Admin Tools->Services).

Test that PaperCut is working correctly by logging into the PaperCut admin interface.

TODO link your page here: https://www.papercut.com/kb/Main/Miscellaneous

----
''Categories:'' [[!Databases]], [[!Architecture]]
----
[-keywords: Microsoft SQL Server, Integrated Authentication, Windows Authentication -]

Comments

Share your findings and experience with other PaperCut users. Feel free to add comments and suggestions about this Knowledge Base article. Please don't use this for support requests.

Article last modified on February 12, 2014, at 11:39 PM
Printable View   |   Article History   |   Edit Article