How to add custom attributes to apache directory studio? - openldap

I'm unableto add new custom attributes to the existing object in the Apache DS LDAP Server.
I have followed the below link and creating the schema.
http://directory.apache.org/apacheds/basic-ug/2.3.2-enabling-schema.html
The schema has been added in the apacheds but it is not showing while creating users.
Note:I'm unable to restart apacheDS. If I tried to restart the apacheds server it won't start again.

You've to restart ApacheDS after changes on the scheme were made. Without restart, no custom scheme is avaliable.
Linux
Use the init.d script:
sudo /etc/init.d/apacheds-${version}-default stop
${version}is the installed ApacheDS version. If you're not sure about this, try this command to find out how your init-script is named:
ls -lh /etc/init.d | grep apacheds
Windows
Open the services console by pressing [Ctrl] + [R] and enter services.msc. Search for an entry called ApacheDS - default and restart it by right click > restart service.
Note that in both cases default is the name of your ApacheDS instance. The software can run different instances, e.g. to run a second test instance. Per default we've only one instance called default. Use this name, if you didn't made any custom instances.
If this didn't solve your problem, please provide more information about the issue. The logs are a good point to start. Find more info about logging in ApacheDS here: http://directory.apache.org/apacheds/basic-ug/1.4.4-configure-logging.html

Related

Changing publisher name and URL

So, yeah, the form is saying:
Please contact the system administrator to change your publisher name
and I'm the system administrator for the project and I don't know what the hell am I doing. :)
I can change the name of the publisher but not the URL. I guess this also changes some URL in the dataset? Do I need to do the change with API or there is some GUI?
BTW. I'm using DGU package.
You should ssh to your server and run commands like this to change the name, and optionally the title too with the -t:
source /home/co/ckan/bin/activate && cd /vagrant/src/ckanext-dgu
python ../ckanext-dgu/ckanext/dgu/bin/publisher_rename.py $CKAN_INI highways-agency highways-england -t 'Highways England'
From: http://guidance.data.gov.uk/publisher_editing.html#rename-a-publisher
The problem is it can take a few minutes to rename and reindex all the datasets, so this often can't be done during a web request. Ideally someone would code this as a background task so this can still be done in the form. However in the meantime DGU implemented this command-line script to do it, hence the need for a sysadmin.

Elastic Kibana - install as windows service

How can I install Elastic Kibana (which is just a batch file) as a windows service?
It probably needs to depend on the ElasticSearch process as well (this assumes I'm running it on the same server)
The following command will create the service with a name of "ElasticSearch Kibana 4.0.1" and make it depend on ElasticSearch so it doesn't try to start too soon.
sc create "ElasticSearch Kibana 4.0.1" binPath= "{path to batch file}" depend= "elasticsearch-service-x64"
The kibana.bat file delivered with Kibana 4.6.1 was not suited to use with sc create directly for me (Service start failed).
I used nssm like this
nssm install kibana461
UI: choose kibana.bat as Application Path
UI: select a log file to write to on "I/O" tab for stdout and stderr
UI: on the "Dependencies" tab enter elasticsearch241 (or whatever you called it)
UI: "Install Service"
sc start kibana461
Rather than creating a dependency, I made a delayed start.
First use the sc command (from jhilden).
sc create "Elasticsearch Kibana 4.4.2" binPath= "C:\kibana-4.4.2-windows\bin\kibana.bat"
Open services.msc and find your new service.
Right click the service and select Properties.
Change to Automatic (Delayed Start).
If you haven't already, change Elasticsearch to Automatic.
This will ensure elasticsearch will start when the machine starts, and kibana will start sometime soon after (approx 2 minutes from this question).
I found this video very helpful.
Use NSSM (Non-sucking Service Manager) to install Kibana as a Service.
https://www.youtube.com/watch?v=L-0A2cqTn-w

Changing Git protocol for RStudio project already under version control in Windows

I love using RStudio for it's built-in integration with version control systems. However with RStudio on Windows is there a way to change the Git protocol from http to ssh or vice versa for a project already under version control without first having to delete and recreate the project?
I might be missing something, but I originally cloned my repo using http which I subsequently found to be a massive pain because every time I want to push project changes to GitHub I have to re-enter my username and password. So I removed the project from version control(Project -> Project Option -> Git/SVN -> Version Control System: none) and then tried to re-add version control hoping to use ssh but it will only allow you to go back to the original protocol you selected when creating the project in the first place.
The only way I have found to change protocol it is to delete the project and then create a new project from GitHub using the correct ssh parameters. I'd really like to be able to change projects version control protocol from http to ssh without deleting and re-cloning first.
Is this possible?
Check out git config and the whole configuration stuff. You can configure several remotes to make the "distributed" aspect of git work.
You can try just copying the whole repository (or just .git/config, keep a copy!) and check what happens with your specific case when you change the configuration. It depends on lots of things that aren't under git's control, like firewall configurations en route, and the configuration on the other end.

Best way to install web applications (e.g. Jira) on Unixes?

Can you throw some points on how it is a best way, best practice
to install web application on Unixes?
Like:
where to place app and its bases and so for,
how to configure to be secure and easy to backup,
etc
For example I know such suggestion -- to set uniq user for each app.
App in question is Jira on FreeBSD, but more general suggestions are also welcomed.
Here's what I did for my JIRA install on Fedora Linux:
Create a separate user to run JIRA
Install JIRA under the JIRA user's home directory
Made a soft link "/home/jira/jira" pointing to the JIRA installation directory (the directory as installed contains the version number, something like /home/jira/atlassian-jira-enterprise-4.0-standalone)
Created an /etc/init.d script to run JIRA as a service, and added it to chkconfig so that it runs at system startup - see these instructions
Created a MySQL database for JIRA on a separate data volume
Set up scheduled XML backups via the JIRA admin interface
Set up a remote backup script to dump the MySQL database and copy the DB dump and XML backups to a separate backup server
In order to avoid having to open extra firewall ports, set up an Apache virtual host "jira.myhost.com" and used mod_proxy to forward requests to the JIRA URL.
I set everything up on a virtual machine (an Amazon EC2 instance in my case) and cloned the machine image so that I can easily restart a new instance if the current one goes down.

How can I shell out of an ASP.NET page and execute a git command?

I want my ASP.NET page to shell out and execute git commands. I put the commands in a bat file which works:
REM cd to the git repo folder
cd c:\temp\mygitrepo
"c:\Program Files\Git\Bin\git.exe" show c090dc4b8b1b3512c1b5363c371e21d810d02f54 -- myfile.txt
If I run my .bat file from a cmd prompt, no problem.
If I run it using System.Diagnostics.Process.Start, I get this error:
RUNTIME_PREFIX requested, but prefix computation failed. Using static fallback
The error is coming from this git file: http://github.com/git/git/blob/master/exec_cmd.c
I use exactly the same technique to run svn.exe commands, no problem.
EDIT 1: From the thread here I've learned that msysgit installs some files in a location associated with the current user, me, instead of all users. The IIS web server is running under another user account. I tried copying some of the git files that caught my eye, like .gitconfig, to other users (in Documents and Settings). No luck. So, I have switched my focus to getting IIS to impersonate me when it launches the git command.
Is it actually an error, or is it just notifying you of a fallback? Based on the code linked, it appears that the command should still execute successfully, only using the static PREFIX rather than the RUNTIME_PREFIX.
If the command is indeed failing, you might want to make sure that any required environment variables are available when starting the process from .NET. You might also need to impersonate a different windows identity to run the command with proper permissions (I am assuming that the ASP.NET identity is restricted as much as possible.) The ProcessStartInfo object provides a few ways to configure the process, including the windows identity, the process verb, and environment variables. Make sure you are providing the proper context that your batch file requires before running it.

Resources