Is there any free ldap server with data? [closed] - ldap

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need to test an application which uses LDAP for authentication, but still I don't have access to the server I have to use, but I need to test my application.
Does somebody know if is there any LDAP server with data that i can use for access??

Here you go: Online LDAP Test Server
It's free, contains data, browsable.
Make sure you use LDAP v3 when trying to bind.
Example of using from command line:
ldapsearch -W -h ldap.forumsys.com -D "uid=tesla,dc=example,dc=com" -b "dc=example,dc=com"
Password: password
Returns:
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
...
# search result
search: 2
result: 0 Success
# numResponses: 16
# numEntries: 15

If you use the UnboundID LDAP SDK, you can stand up an in-memory LDAP server to use for testing. The API to deploy an in-memory server is included in the API. The standard edition is free, and the source code is included. I've included an example in this blog entry.

If you use a unix-like OS, I wrote a simple server in Java, that uses the Apache Directory Studio SDK to serve LDAP:
https://github.com/intelie/dummyldap

ldap://directory.verisign.com is available according to one of Terry's blogs.

Related

How can I prevent apache to log Health Checks in Docker? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have a dockerized web application deployed, and everything works just fine, logging every request, including a HUGE number of health checks, which are configured to hit the page /health, a blank page.
I think it's a common problem, and I found this question for a different stack (Elastic Beanstalk).
I'd like to have a solution that is completely automatic and possibly in the Dockerfile
First of all, I need an additional configuration file for Apache, let's call it apacheLogFilter.conf.
The content will be pretty easy, but it could be customized as much as we want, defining custom rules. The trick is defining a custom environment variable that, if present, will stop the logging for that request
SetEnvIf Request_URI "^/health$" dontlog
Once defined this new configuration, we need to plug it into apache directly in the Dockerfile, adding the following rows:
FROM php:7.2-apache
...
# Copy the log-filtering configuration in the right place
COPY apacheLogFilter.conf /etc/apache2/conf-enabled
# Change the standard logging entry of all the available sites to use the variable
RUN sed -ri -e 's!combined!combined env=\!dontlog!g' /etc/apache2/sites-available/*.conf
...
In this way, the configuration file will be loaded by apache at startup, each request will check the rules defined, and in case one of them will trigger, the request will not be logged

tool to view test.h2.db (H2 database) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
My java code is using h2 database and generating test.h2.db file.
I searched online but couldn't find any tool to import this DB file and look what are the tables are available in that DB file.
I tried DbVisulizer but couldn't import this DB file.
If any one worked or faced the same problem, please let me know the solution.
As shown here, you can use the Shell command to open the database file. In the example below, the database is named test and the database file name test.h2.db is inferred. As noted here, the url specifies that the database file resides in the user's home directory.
$ java -cp h2.jar org.h2.tools.Shell -url \
"jdbc:h2:file:~/test;ifexists=true" -user "sa" -password ""
At the prompt, type ? for help or enter SQL commands:
sql> show tables;
TABLE_NAME | TABLE_SCHEMA
CUSTOMER | PUBLIC
…
Note that the schema may be empty if you previously neglected the ifexists predicate.
You can use the H2 DB installation.
You need to:
install the H2 DB (for example: h2-setup-2019-10-14.exe),
go to folder where you install the H2 DB (for example: \H2\bin)
run the H2 DB (launch the file: h2.bat)
you should see the Console H2 in the browser (or use the url in browser: http://localhost:8082/
in Console H2 set option:
Genercic H2 (Embedded)
Genercic H2 (Embedded)
Driver: org.h2.Driver
JDBC URL: jdbc:h2:D:/Java/H#_DB/db/repository.mv.db (appropriate path in your disk where is the file )
User:
Password:

Reduce server response time - apache2 on debian 7 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have pretty well-optimized website, PageSpeed Insights tool shows good results, but Google keeps saying reduce server response time which is 0.46 seconds. And it must not be greater than 200ms.
I have tried to delete all my htaccess content, then replace index.php with an empty index.html file, but server response remained the same. I am using a virtual private server with Debian 7and storing 2 websites with SSL on different IP addresses. The second site responds perfectly in 144 ms.
So, I can't find the reason why one site loads under 200ms and other in 460ms. I'm pretty sure that server has enough resources.
I would be grateful for the ideas.
You could try some tweaks on your apache server. Can't guarantee that you'll get the desired result but it's an easy job and I think you have nothing to lose if you try it! So edit your apache2.conf file and adjust your actual settings to match the ones bellow (these are good settings in terms of web server security as well).
TraceEnable Off
ServerSignature Off
ServerTokens Prod
FileETag None
HostnameLookups Off # this is important since your apache server won't try to translate your ip address into a dns name or host when you access your website
ExtendedStatus On # you can enable it afterwards, if you need it
Timeout 10
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
You could also disable apache modules (modules that you do not need or use). By default apache loads a big list of modules and I am pretty sure that you won't be needing them all. I can't provide you a list with what to keep enabled or what to disable but you can do a little Google research and based on your website you could decide what to disable and what to keep.
I am actually using all these settings on my CentOS 6.8 linux box and all the settings are in httpd.conf. On Debian you should edit /etc/apache2/apache2.conf and maybe some other files!

SSH Viewing/editing files across multiple accounts [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Apologies if this has already been asked already, but I tried a quick search and couldn't find my problem.
Basically I am trying to SSH a file onto my friends server from my computer for him to read and modify himself. He has given me my own login and sufficent rights etc, but he is unable to see what I've uploaded to the server, nor can I see what he has added.
I am currently using:
scp hello.txt username#domain.com:/home/username/
which uploads correctly and I can see it.
Could someone please help me out and explain why he is unable to view what he's uploaded, and vice versa?
How can we set it up so we can see each others files and modify them (some sort of public folder?)?
The problem are most likely the access rights on the directory/file. A non-root user might not be able to see the contents of the home directory of another user. If you upload a file to your home directory, your friend can consequently not see the uploaded file and vice versa.
The solution is simple: you need a directory on which both of you have the appropriate permissions, as you already assumed. Try this:
# on the server
mkdir /var/your_share/
chmod o+rwx /var/your_share/
# on your host
scp hello.txt username#domain.com:/var/your_share/
# on the server
ls -l /var/your_share/hello.txt
The ls -l displays the permissions of the uploaded file.
-rw-r--r-- 1 username username 10 Oct 13 15:49 hello.txt
If it says something like this, your friend will not have permissions to change the file but only to read it. Use the following command to grant him write permissions for that file:
# on the server
chmod o+w /var/your_share/hello.txt
ls -l /var/your_share/hello.txt
The output should then be something like:
-rw-r--rw- 1 username username 10 Oct 13 15:49 hello.txt
Note: The permissions granted in these commands are not only for the account of your friend but for all accounts on the server. That means everybody can read and write to the file. If you want to change that, you have to setup a group and only grant rights to the group.

Is there an online LDAP emulator? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 months ago.
Improve this question
I'm doing some homework with LDAP that consists of creating LDIF files, adding them to the LDAP server, and afterwards performing some searches and viewing the results.
To avoid installing LDAP in my computer, I'm wondering if there exists some LDAP emulator online service where I can execute these instructions.
I've seen something similar with "online sql emulator", but not anything about LDAP.
Another alternative is the in-memory directory server provided by the UnboundID LDAP SDK, which I talk about here. There is no need to install a server. LdapListenerExample.java gives an example of how to use the in-memory directory server. The example shows how to create the server, start it listening, load schema files listed as command line options, and load a file containing LDIF into the server database.
Unfortunately, I'm not aware of such a thing.
As an alternative, I'd suggest you use OpenDS, which is very easy to deploy (e.g. via Install with QuickSetup) and to get rid of afterwards. It's import-ldif, make-ldif and export-ldif commands could be useful for your work.
I recently wrote godap - a very minimalistic LDAP server library in Go. It doesn't read LDIFs, but you can easily make it response to bind and search operations. (It also may provide insight into the LDAP protocol.)