Edgewall Software

Ticket #2740 (closed defect: worksforme)

Opened 3 years ago

Last modified 3 years ago

Authentication not enabled, even if --auth option is set

Reported by: Torfinn.Johansen@… Owned by: jonas
Priority: high Milestone:
Component: web frontend/tracd Version: 0.9.3
Severity: major Keywords:
Cc:

Description (last modified by cboos) (diff)

When I try to access the "Login" option in the Trac main window, tracd complains that the "--auth" option is not set, but it is. Why does it complain? In the browser is get ofcourse only "page cannot be displayed".

I have generated the password file, so that should be OK.

The tracd is started from command-line on a windows 2003 server.

see logs from tracd below:


C:\Program Files\Plone 2\Python\Scripts>python tracd --auth Project1,c:\project\project1\users.htdigest,trac --port 42000 c:\trac_env
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:43] "GET / HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/css/trac.css HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/css/wiki.css HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/js/trac.js HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/css/code.css HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/trac_banner.png HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/topbar_gradient.png HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/trac_logo_mini.png HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/topbar_gradient2.png HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/dots.gif HTTP/1.1" 200 -
hrdws03.hurtigrutedata.local - - [09/Feb/2006 14:29:44] "GET /trac_env/chrome/common/extlink.gif HTTP/1.1" 200 -
----------------------------------------
Exception happened during processing of request from ('192.168.152.237', 3249)
Traceback (most recent call last):
  File "C:\Program Files\Plone 2\Python\lib\SocketServer.py", line 463, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Program Files\Plone 2\Python\lib\SocketServer.py", line 254, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Program Files\Plone 2\Python\lib\SocketServer.py", line 521, in __init__
    self.handle()
  File "c:\Program Files\Plone 2\Python\lib\BaseHTTPServer.py", line 324, in handle
    self.handle_one_request()
  File "c:\Program Files\Plone 2\Python\lib\BaseHTTPServer.py", line 318, in handle_one_request
    method()
  File "C:\Program Files\Plone 2\Python\Lib\site-packages\trac\web\standalone.py", line 259, in do_GET
    self._do_trac_req()
  File "C:\Program Files\Plone 2\Python\Lib\site-packages\trac\web\standalone.py", line 295, in _do_trac_req
    raise util.TracError('Authentication not enabled. '
TracError: Authentication not enabled. Please use the tracd --auth option.

Attachments

Change History

Changed 3 years ago by cboos

  • component changed from log view to tracd
  • description modified (diff)

(made the log readable)

Changed 3 years ago by cboos

  • status changed from new to closed
  • resolution set to worksforme

Try:

python tracd --auth trac_env,c:\project\project1\users.htdigest,trac --port 42000 c:\trac_env

The first sub-argument to --auth is the environment name, as you may want to have different auth files for different environments.

If it's not the case and you have multiple environment using the same auth file, simply use "*" instead of the environment name.

Check TracStandalone#UsingAuthentication.

Changed 3 years ago by lucklulu

this bug troubles me 3 days. Sooooo :X

Changed 3 years ago by kulmacet

I was having this very issue in the standalone mode but was able to resolve. Here are my steps, hope this helps:

The project was created using-> trac-admin /path/to/trac_project_env IniteNV

The site would run and with out authentication using-> tracd -d --port 8000 /path/to/projectenv

When the authentication portion was added using htdigest-> tracd --port 8000 --auth IniteNV,/trac/user/users.htdigest,trac /path/to/projectenv (The guide is a bit unclear here)

It would seem to run but when you clicked the login would generate the error-> TracError?: Authentication not enabled. Please use the tracd --auth option. As you can see the --auth switch is enabled.

What made this work for me is the changes to the project name being passed from IniteNV to initenv in other words-> tracd --port 8000 --auth IniteNV,/trac/user/users.htdigest,trac /path/to/projectenv (Failed) tracd --port 8000 --auth initenv,/trac/user/users.htdigest,trac /path/to/projectenv (Worked)

Add/Change #2740 (Authentication not enabled, even if --auth option is set)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from jonas. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.