Passing username within URL

Moderator: crythias

Post Reply
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Passing username within URL

Post by Gunz »

Hi, I've set up OTRS v2.4.8 Windows version to be used as an internal IT Helpdesk.

Customers will be our internal staff. They will use the Customer Panel interface to log tickets (requests) for IT help, search on existing etc.

Our OTRS Customer login username is the same as their Windows login. Windows makes this available as the USERNAME variable.

Is there any way to pass the Windows USERNAME variable to the OTRS Customer login Username field within a URL? This would save our customers needing to type it to gain access via the Customer Panel.

I've tried "http://servername/otrs/customer.pl.username=$USERNAME" and that didn't work. I was wondering if there was something that could be used within the URL that would work.

thanks!
Mike_B
Moderator
Posts: 266
Joined: 12 Jan 2010, 18:16
Znuny Version: CVS HEAD

Re: Passing username within URL

Post by Mike_B »

Gunz wrote: Is there any way to pass the Windows USERNAME variable to the OTRS Customer login Username field within a URL? This would save our customers needing to type it to gain access via the Customer Panel.
Hi, you can try this:

Code: Select all

http://example.com/otrs/customer.pl?Action=Login&User=yourname
but unfortunately this will try and log you in without a password and then raise an error.

Please look at using Single Sign On for a real nice solution; no loggin in required:
http://wiki.otrs.org/index.php?title=Im ... ith_Apache

Regards,

Mike
huntingbears.nl - @michielbeijen on Twitter
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Passing username within URL

Post by Gunz »

Thanks Mike. I'll take a look at single sign-on.

--Wayne
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Passing username within URL

Post by Gunz »

OK... I'm stumped when I'm setting up single sign-on.

The Instructions state:

Add the following statements to the <Directory> block of your cgi-bin directory:

<Directory "d:/otrs/bin/cgi-bin/">
SSPIAuth On
SSPIAuthoritative On
SSPIDomain pdc.example.com
SSPIUsernameCase lower
SSPIOfferBasic On
Require valid-user
Options +ExecCGI -Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>


I have no idea of what file this is asking me to update with this information? Does anyone know where this should go?

As well, am I correct in thinking I have to change the line SSPIDomain pdc.example.com and update "pdc.example.com" to my own domain?

All help, very much appreciated.

--Wayne
Mike_B
Moderator
Posts: 266
Joined: 12 Jan 2010, 18:16
Znuny Version: CVS HEAD

Re: Passing username within URL

Post by Mike_B »

Gunz wrote:OK... I'm stumped when I'm setting up single sign-on.

The Instructions state:

Add the following statements to the <Directory> block of your cgi-bin directory:

<Directory "d:/otrs/bin/cgi-bin/">
SSPIAuth On
SSPIAuthoritative On
SSPIDomain pdc.example.com
SSPIUsernameCase lower
SSPIOfferBasic On
Require valid-user
Options +ExecCGI -Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>


I have no idea of what file this is asking me to update with this information? Does anyone know where this should go?

As well, am I correct in thinking I have to change the line SSPIDomain pdc.example.com and update "pdc.example.com" to my own domain?

All help, very much appreciated.

--Wayne
Sure, you should change pdc.example.com to your own PDC address.
It should be added to the <directory> block in the Apache configuration file. And that would be in [path\to\otrs]Apache\conf\httpd.conf - you can open the file with a text editor such as Wordpad. You'll find the appropriate section near the bottom of the file.

--
Mike
huntingbears.nl - @michielbeijen on Twitter
Gunz
Znuny newbie
Posts: 44
Joined: 30 Jun 2010, 01:43
Znuny Version: 2.4

Re: Passing username within URL

Post by Gunz »

Thanks again Mike!

--Wayne
tripti_rai2005
Znuny newbie
Posts: 67
Joined: 14 Mar 2012, 15:08
Znuny Version: OTRS2

Re: Passing username within URL

Post by tripti_rai2005 »

I have followed all the instructions mentioned here at http://wiki.otterhub.org/index.php?titl ... ith_Apache
But i am getting the following error
[Tue Jan 8 11:41:26 2013][Notice][Kernel::System::Auth::HTTPBasicAuth::Auth] User: No $ENV{REMOTE_USER} or $ENV{HTTP_REMOTE_USER} !(REMOTE_ADDR: 127.0.0.1).
[Tue Jan 8 11:41:26 2013][Error][Kernel::System::User::UserLookup][724] Need UserLogin or UserID!
Can you please tell what wrong am i doing..I made the required changes in config.pm and httpd.conf as explained in the article.
■ TRIPTI RAI // PROJECT ENGINEER, ETIM GTEC
Office: +91 20 66056464 //Mobile: +91 9503019176 // // Whirlpool Corporation // www.WhirlpoolCorp.com
Whirlpool Corporation // www.WhirlpoolCorp.com
tripti_rai2005
Znuny newbie
Posts: 67
Joined: 14 Mar 2012, 15:08
Znuny Version: OTRS2

Re: Passing username within URL

Post by tripti_rai2005 »

??
■ TRIPTI RAI // PROJECT ENGINEER, ETIM GTEC
Office: +91 20 66056464 //Mobile: +91 9503019176 // // Whirlpool Corporation // www.WhirlpoolCorp.com
Whirlpool Corporation // www.WhirlpoolCorp.com
juanman80
Znuny newbie
Posts: 44
Joined: 11 Nov 2011, 10:30
Znuny Version: 5.0.15

Re: Passing username within URL

Post by juanman80 »

I've seen this error when you use HTTP Basic Auth in OTRS but Apache received no user data... It happened to me when people tried to get to OTRS from a computer not in Domain.
Hope it helps
OTRS 5.0.15 on CentOSLinux with MariaDB database connected to an Active Directory for Agents and Customers.
tripti_rai2005
Znuny newbie
Posts: 67
Joined: 14 Mar 2012, 15:08
Znuny Version: OTRS2

Re: Passing username within URL

Post by tripti_rai2005 »

Hey..Thanks ..That was exactly my problem..Although i solved it before..Thanks for your input!
■ TRIPTI RAI // PROJECT ENGINEER, ETIM GTEC
Office: +91 20 66056464 //Mobile: +91 9503019176 // // Whirlpool Corporation // www.WhirlpoolCorp.com
Whirlpool Corporation // www.WhirlpoolCorp.com
Post Reply