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.)
Related
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
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 9 years ago.
Improve this question
How to add custom variable name with apache logs so that I can add my project name with my error logs in beginning, it is helpful for recognizing error logs with project name. I have lot of projects in my organization and project can be build in any language, I want to track all logs on a one place, but issue is that which errors are coming from which projects, i am unable to get it, so I want to add project name with logs. please suggest me, if any documentation is there, so i can manipulate apache then share with me.
Apache Access Log is using a log format defined by LogFormat directive.
This format can contain a lot of things. One of theses things is %{VARNAME}e : The contents of the environment variable VARNAME. So using SetEnv on your application VirtualHosts you could manage your goals.
But this does not work for ErrorLog. If you manage applications with Virtualhosts you should use separate ErrorLog files on theses Virtualhosts.
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 9 years ago.
Improve this question
On my remote server A, I have a bunch of .py files.
I drag those files to a Windows machine, B, via WinSCP.
I work on these files on the Windows machine and want to import them back to server A via WinSCP.
When I try that, it says "cannot overwrite".
Obviously it's a permissions issue. I am not sure how much permission I need to give in order to have the overwrite access.
Currently, I have -r--r--r-- on these files for reading.
I am guessing I need write access? Or do I need execute access as well?
Will chmod 755 * be sufficient? I want to be careful with permissions so I am asking on here.
That depends on what users are owner of the files and the one you connect with SCP.
If they are the same, then '-rw-r--r--' should be enough.
If they are on the same group then -rw-rw-r--
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.
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
Are there any free SMTP servers that just accept the mail sent through them, and save it to your hard disk, without sending it to the recipient. I would like to use this for testing my applications. Instead of just waiting around for the mail to go through, it would be nice if all emails could just be dropped in a folder, so that I can look at them. I could put some hooks into my program to just save instead of sending the message, but I don't think it's a full test, if the code follows a different path. Are there any existing applications like this?
I figure this would be really helpful, because you could test the mail abilities without needing to wait for the mail server to deliver it, and so that you can code while you're offline, and don't have access to an actual mail server.
[EDIT]
I'm specifically using .Net, but I'm not using the default SMTP mail handling classes in .Net, because of how limited they were in .Net 1.1. We are using a third party library (chilkat). I know that things have changed since then, but the code is stable and works, so no point in rewriting against the .Net API now.
I would like something that works as an SMTP server specifically because I could use it in the future for whatever projects I worked on, no matter the language.
You can use the standard smtp settings in your app or web.config and just specify what folder you want the emails to go.
<smtp
deliveryMethod="specifiedPickupDirectory"
from="from address">
<specifiedPickupDirectory>Your folder here</specifiedPickupDirectory>
</smtp>
This allows you to simply store the emails without an smtp server
Papercut
Neptune
SMTP4Dev
Dumbster
DevNull SMTP
Taken from this question.
On windows you could use IIS server's default SMTP server. Add an alias to its domain for * (wildcard) should cause it to drop all mail forwarded to it into its drop folder.
It's fairly easy to do in sendmail or postfix - just configure the local delivery agent to be 'cat >> file'.
bit late on this one, but have you tried ssfd?
you can put it on your machine or on a network server, catches e-mails and pops them in a directory
There is the python DebuggingServer as well part of the standard library :
http://docs.python.org/library/smtpd.html#debuggingserver-objects
it will print everything on stdout.
Don't know about such "fake" SMTP servers, but in .NET you can force SmtpClient class to save outgoing mail to the specified directory.
I am years late to the party but this works great for me.
http://emailrelay.sourceforge.net/
Having the .net email client just save the email and not send it
does not answer the question if your code works. To tell if it works
you must actually send it.