Archive for category *nix

Adding user and assigning password for user in LDAP

Sample  file

cat user.ildf

dn: cn=server1user1,ou=group,dc=ldap,dc=devserver,dc=local
cn: server1user1
objectClass: top
objectClass: posixGroup
gidNumber: 10000

# User account
dn: uid=server1user1,ou=people,dc=ldap,dc=devserver,dc=local
cn: Server1 user1
givenName: Suesr1
sn: user1
uid: server1user1
uidNumber: 120000
gidNumber: 120000
homeDirectory: /home/server1user1
mail: server1user1@dev.local
objectClass: top
objectClass: … Read more

, ,

No Comments

OpenLDAP MultiMaster Replication

For server 1 add following lines on  /etc/ldap/ldap.conf

#
# LDAP Defaults
#

loglevel 256

BASE dc=ldap,dc=devserver,dc=local

URI ldap://openldap.devserver ldap://openldap2.devserver

serverID 1 “ldap://openldap.devserver”

moduleload syncprov
overlay syncprov
syncprov-checkpoint 10 1
syncprov-sessionlog 100

syncRepl rid=1
provider=”ldap://openldap2.devserver”
binddn=”cn=admin,dc=ldap,dc=devserver,dc=local”
bindmethod=simple
credentials=ldap
searchbase=”dc=ldap,dc=devserver,dc=local”Read more

, , ,

No Comments

iptables port forwarding

port 80 forwarding from 172.64.64.8 to 172.64.64.23

iptables -t nat -A PREROUTING -d 172.64.64.8 -p tcp --dport 80 -j DNAT --to 172.64.64.23:80
iptables -t nat -A POSTROUTING -d 172.64.64.23 -p tcp --dport 80 -j MASQUERADE

sip forwarding from 172.64.64.8 … Read more

No Comments

Useful *nix commands

Some useful *nix commands for System debugging and administration.

, , ,

No Comments