Disable Trac Authentication for local Usage - authentication

I set up a local Trac wiki using a conda env, where I installed all dependencies, except the system packages, which I installed in the system:
trac-admin . initenv
I entered the required infos like project name there.
Then I run the Trac standalone server.
tracd --port 8000 .
inside the directory, where I set up the wiki.
Since this is supposed to be a wiki, which I use locally myself and not for any multiuser setup, I don't need any authentication functionality. How can I deactivate any authentication or need for login for Trac?
I know that I don't have permissions, because I used the quick search field for a page, which could not exist and when the wiki showed no results, it didn't offer a create page button of any kind. According to the StartPage, this means I don't have permissions.
I couldn't find any enable/disable setting for this in the ./conf/trac.ini to do this. It would also be acceptable to find an easy way to create a user, as which I login to Trac, but all the guides from Trac documentation assume prior knowledge of some kind of configuration files and they don't explain those exactly. For example here. Where does that configuration file even go and what kind of syntax does this use? Not really helpful.

You are correct that you need to modify the permissions (authorization). The permissions are stored in the database rather than trac.ini. You need to grant permission using trac-admin utility. See TracPermissions.
trac-admin $env permission add anonymous WIKI_CREATE WIKI_MODIFY WIKI_DELETE WIKI_RENAME
For help, execute:
trac-admin $env permission help
If you wish to setup authentication, see TracStandalone: UsingAuthentication.

Related

Gerrit admininitrator does not access “All-Projects”

All members in the Administrators group can NOT access "All-Project".
I am afraid that the read permission is removed from "All-Project" for admin.
How can I recover it.
And I can find project.config in the ./All-Project .
If you can still ssh then you can checkout All-Projects.git and edit the config.
If you have access to server, you can even navigate to the All-Project.git directory (its a base repo) and rollback to an earlier change. (Obviously backup everything first if you're not very confident of what you're doing).

Can I change gerrit authentication type from openid to ldap?

We in our team are planning to use gerrit. So, to get introduced, I did set up a server, used open-id for authentication and created some test-users and test-projects in it.
Now we are ready to use it. But we actually prefer LDAP for real use.
So, can I change my authentication system from open-id from LDAP? What will happen to current users then?
I want to clear test projects and changes. How can I do them?
Can I complete delete existing gerrit setup and initiate a fresh setup in same machine? (I tried extracting the jar in different folder, but I faced some problems in it)
I am using Ubuntu 12.04 as my server.
Please help.
Delete the database (you're not using the H2 database anymore, but some MySQL or PostgreSQL server, don't you?) plus the directory where Gerrit is running (the -d parameter, see docs). Additionally, remove the git repos, if you configured them to be located on a different path.
Then all your data is gone and you can start from scratch.

thinking about moving to Trac

We're starting development and are at a point where we need a bug tracking site. Our code is in SVN and we're thinking of using Bugzilla, but setup is tricky. I'm considering going for Trac instead. From what I understand, Trac would need to be on the same machine as SVN.
I'm really having a hard time parsing through the Trac documentation. What kind of things should I look for when I'll be migrating?
You are correct that Trac must be running on the same machine as the svn repository; it requires local access to the repo.
To use Trac, you need to: install the Trac software, create a Trac environment, configure your webserver, configure Trac authentication and users, customize Trac as needed for your purposes.
To install Trac, you can use the egg, rpm, or your distro's packaging system, etc.
To create your Trac environment, you will run
trac /path/to/new/trac/environment initenv
and follow the prompts. Since you have an existing svn repo, you will specify the path to it at that prompt.
To configure your webserver, you'll need to decide among several options. I tend to use mod_python though others will direct you to mod_wsgi.
I would recommend installing the AccountManagerPlugin and using its "form based login" instead of http auth. Using it with its htpasswd backend works well; you'd point it to an htpasswd file you create with an admin user and a good password. Then you would grant that admin account full access to the Trac environment like this:
trac /path/to/new/trac/environment permission add admin TRAC_ADMIN
You should now be able to log into Trac with your web browser as your admin user and customize Trac as desired.
Also, #trac on freenode is a good resource for getting help.
Disclosure: I'm one of the Trac devs.

add user to turnkeylinux.org, Trac instance

I'm trying to get up and running on Trac quickly for a pending migration. Could someone tell me how to add new users to Trac. As I understand it trac authenticates against apache, which uses a password file. I know how to use htpasswd but I don't know where the password file is. Am I going down the wrong road here?
Somewhere in your Apache configuration (like mod_python.conf) you'll have a line that specifies where the authentication file is:
AuthUserFile /var/lib/trac/your_auth_file
While you're in looking at that file, look for the base Trac directory. It may be specified as:
PythonOption TracEnv /var/lib/trac/yourProject
Once you've used htpasswd to add them to that file, you'll want to add them to Trac, so you'll need to run trac-admin:
trac-admin /var/lib/trac/yourProject
You can then issue a help command to learn how to add users to trac, etc.
Turns out all I needed to do was use htpasswd in the folder where my track site was. And then I was able to use the admin tool in track to give that user permission in track.

How to authenticate users on TortoiseHg web server?

TortoiseHg web server configuration has an "Allow Push" parameter where I put the users allowed to push changes. But when I try to push I get an "authorization failed" error. How are the users authenticated? Where do the passwords come from?
Setting allow_push = * will allow anybody to push to your repository served with hg serve. You should of course only do that on a trusted network. Apart from that, you cannot do authentication with hg serve -- you need a webserver in front of it that will authenticate users.
Please see hgrc for a terse explanation of allow_push and the wiki for a slightly longer explanation about what hg serve is for.
I'm just getting into Mercurial, and from what I can tell (and read in the documentation), the TortoiseHg web server isn't meant to be a permanent solution. The docs seem to steer you towards running either Apache or lighttpd.
You may also want to check out Vampire Basic's tutorial on running Mercurial on Windows.
I believe you can just edit your hgrc file, under the [authorize] section:
Store password in TortoiseHg