Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Friday, June 19, 2009

Start ldap with non-root

On Fri, Aug 15, 2003 at 09:59:36AM -0700, Ben Poliakoff wrote:
> Of course slapd's "-u USER" option will direct it to run as whatever
> arbitrary user, but unless that user is root you'll need to run the
> service on a >1024 high port.

so, if you expect to start ldap with non-root, you must change the port of ldap > 1024. In this case, i'm using 1025 for my ldap .
My OS: FreeBSD

#=========/etc/rc.conf
slapd_enable="YES"
slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://192.168.1.235:1025/"'
slapd_sockets="/var/run/openldap/ldapi"

Wednesday, March 18, 2009

Using syslog or syslog-ng with slapd for OpenLDAP logging

OpenLDAP Quick Tips: Using syslog or syslog-ng with slapd for OpenLDAP logging

Friday, November 14. 2008

Open Source OpenLDAP Suretec
Hi All,

Here's my third tip in the "OpenLDAP Quick Tips" series:

"You want to enable logging via syslog or syslog-ng for your directory server":

For syslog, depending on your distro, you would edit /etc/syslog.conf or /etc/rsyslog.conf:



CODE:
# LDAP[?] logs LOCAL4.* -/var/log/openldap.log


and then restart syslog/rsyslog:

CODE:
/etc/init.d/syslog restart


For syslog-ng, the following will work:

CODE:
source s_all { unix-stream("/dev/log"); internal(); }; destination d_ldap { file("/var/log/ldap[?].log"); }; filter f_syslog { not facility(auth, authpriv) and not match(slapd); }; filter f_ldap { match("slapd"); }; log { source(s_all); filter(f_syslog); destination(d_syslog); }; log { source(s_all); filter(f_ldap); destination(d_ldap); };


You can also add:

CODE:
options { sync(n); };


and then restart as per your distro tools.

Thanks,

Gavin.

Tuesday, March 10, 2009

extract *.tgz

tar xvzf file.tar.gz
tar xvzf file.tgz

Friday, November 21, 2008

Converting slapd.conf to slapd.d

Converting from slapd.conf(5) to a cn=config directory format

Discuss
slap* -f slapd.conf -F slapd.d/
(man slapd-config)

Wednesday, November 5, 2008

.cshrc

# $FreeBSD: src/etc/root/dot.cshrc,v 1.30 2007/05/29 06:37:58 dougb Exp $
#
# .cshrc - csh resource script, read at beginning of execution by each shell
#
# see also csh(1), environ(7).
#

alias h history 25
alias j jobs -l
alias la ls -a
alias lf ls -FA
alias ll ls -lA

# A righteous umask
umask 22

set path = (/sbin /bin /usr/sbin /usr/bin /usr/games /usr/local/sbin /usr/local/bin $HOME/bin
)
setenv PACKAGEROOT ftp5.us.FreeBSD.org
setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-7.0-release/Latest/

setenv EDITOR vi
setenv PAGER more
setenv BLOCKSIZE K

if ($?prompt) then
# An interactive shell -- set some stuff up
set prompt = "`/bin/hostname -s`# "
set filec
set history = 100
set savehist = 100
set mail = (/var/mail/$USER)
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
endif

set autolist
set autocorrect

alias ls gnuls -N --show-control-chars --color
alias l gnuls -l -N --show-control-chars --color
alias ll gnuls -al -N --show-control-chars --color
alias lld gnuls -ald -N --show-control-chars --color
set prompt = '%n@%m:%/%# '