Modify

Opened 6 years ago

Closed 3 years ago

#4637 closed enhancement (fixed)

How to create first user with TRAC_ADMIN rights?

Reported by: srimanthula.radhakrishna@… Owned by: hasienda
Priority: low Component: AccountManagerPlugin
Severity: normal Keywords: needinfo TRAC_ADMIN create user documentation
Cc: Trac Release: 0.11

Description

Hi,

I use Trac 0.11.2.1 for my projects. So far, I've been using
the .htpasswd mechanism of authentication that is provided by Apache.
One of the first things I do after setting up a Trac project on Apache
is to create a .htpasswd file with a user, say TracAdmin, and then
give that user TRAC_ADMIN rights.

However, didn't quite like the .htpasswd mechanism - since for every
user that I needed to add, I had to log into the server and add 'em.
And password management was a nightmare.

I looked up AccountManagerPlugin, and looked like it made my life
easier. Installed it, and then enabled these components:
AccountManagerAdminPage, AccountManager, SessionStore,
AccountChangeListener, AccountChangeNotificationAdminPanel,
HtPasswdHashMethod, AccountModule, EmailVerificationModule,
LoginModule, RegistrationModule.

I intended to use SessionStore with HtPasswdHashMethod to keep track
of my users and their passwords. The AccountManagerPlugin wiki says
(here, http://trac-hacks.org/wiki/AccountManagerPlugin#LoginModule)
that, to use the Login Module, I need to disable HTTP based
authentication provided by Apache.

My question:

If I were to enable AccountManagerPlugin before creating any users,
how do I go about creating the first user with TRAC_ADMIN rights??

Can someone please help?

Regards,
Radha.

Attachments (0)

Change History (5)

comment:1 follow-up: Changed 6 years ago by gsf

This sounds more like an issue for the trac-users mailing list than a bug, but I'll add to it here anyway.

You can see the script mentioned at the AccountManagerPlugin page to convert users from htpasswd, but if that doesn't work for you you can enable registration before switching to SessionStore, then register a new user through the web, then grant that user TRAC_ADMIN rights.

comment:2 in reply to: ↑ 1 Changed 4 years ago by hasienda

  • Keywords needinfo create added; AccountManagerPlugin SessionStore First removed
  • Owner changed from pacopablo to hasienda
  • Summary changed from AccountManagerPlugin - SessionStore - First user with TRAC_ADMIN rights? to How to create first user with TRAC_ADMIN rights?

Replying to gsf:

This sounds more like an issue for the trac-users mailing list than a bug, ![...]

True. Please ask there first next time.

You can see the script mentioned at the AccountManagerPlugin page to convert users from htpasswd, but if that doesn't work for you you can enable registration before switching to SessionStore, then register a new user through the web, then grant that user TRAC_ADMIN rights.

Did this help and provide needed information or at least point you to a place, from where you could proceed? I'm looking forward to getting your feedback before closing this ticket.

BTW: I've found a nice walk-through here: http://trac.gnowledge.org/trac/wiki/TracConfig that despite of using HtDigestHashMethod and maybe other differences to your setup could still be somewhat helpful. Certainly you'll find some if not plenty more places, where Trac admins share such information.

comment:3 Changed 4 years ago by hasienda

  • Keywords documentation added
  • Priority changed from normal to low
  • Type changed from defect to enhancement

We might give relevant hints in the future at the AccountManagerPlugin wiki page. So let's keep this as a hint on possible documentation improvements for now.

comment:4 Changed 4 years ago by hasienda

I've been thinking about a setup mode I'd call parachute mode.

This is, if there is no valid, authenticated user found on module load time, AccountManager will lift permission checks on admin pages to allow anonymous users to see current configured and allow to add one new user. Then Trac should be restarted, user granted TRAC_ADMIN permissions, and there you are.

How about that? Vote for it and/or throw your own suggestions in here, please!

comment:5 Changed 3 years ago by hasienda

  • Resolution set to fixed
  • Status changed from new to closed

Seems like parachute mode is not such a brilliant idea, or is it just nobody recognized this suggestion? I'll track it at another place.

Until now our new cookbook page for AcctMgr has become a definitive must-read for beginners. While not perfect, it already holds all information requested here. So I consider this documentation request as resolved.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.