July 2016
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

Categories

July 2016
M T W T F S S
 123
45678910
11121314151617
18192021222324
25262728293031

CONNECT RHEL7 TO AN OPEN LDAP SERVER

e LDAP server will be named instructor.example.com in this procedure.

Install the following packages:

# yum install -y openldap openldap-clients openldap-servers migrationtools net-tools.x86_64 Generate a LDAP password from a secret key (using redhat):

# slappasswd -s redhat -n > /etc/openldap/passwd Generate a X509 certificate valid for 365 days:

# openssl req -new -x509 -nodes -out […]

Install NFS on the LDAP Server

We need to install NFS on the LDAP server. Note: it’s not required to have the LDAP server and the NFS server on the same machine, it’s only easier.

The first step is to install all the necessary packages for NFS. Once these packages are installed, each package needs to be enabled and started.

# […]

HOW TO SETUP THE NTP SERVICE IN RHEL7

Install the NTP package:

# yum install -y ntp Activate the NTP service at boot:

# systemctl enable ntpd Start the NTP service:

# systemctl start ntpd The NTP configuration is in the /etc/ntp.conf file.

To quickly synchronize a server, type:

# systemctl stop ntpd # ntpdate ntp.internode.on.net 5 Jul 10:36:58 ntpdate[2190]: adjust time server […]

Redhat 7.2 Reset Password

Edit grub2 boot menu, press e key for edit.

Move your cursor ( HINT: move to end of the line with CTRL+E ) on rhgb quiet keywords and replace them with init=/bin/bash Once you edit the boot line as show above press CTRL + x to start booting your system into a single mode.

# […]

Rebuilding the initrd RHEL 3, 4, 5 and initramfs RHEL 6, 7

Rebuilding the initrd (RHEL 3, 4, 5)

# cp /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.$(date +%m-%d-%H%M%S).bak # mkinitrd -f -v /boot/initrd-$(uname -r).img $(uname -r)

If you are in a kernel version different to the initrd you are building (including if you are in Rescue Mode) you must specify the full kernel version, without architecture:

# mkinitrd -f […]

Fedora 20 automount nfs fs with autofs

Fedora 20 automount nfs fs with autofs # yum install autofs

# cat /etc/auto.misc # # This is an automounter map and it has the following format # key [ -mount-options-separated-by-comma ] location # Details may be found in the autofs(5) manpage

cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom RemoteDownload -rw,soft,intr 192.168.1.100:/Download

# the following entries are samples to […]

Single User mode is password protected by the root password on RHEL 7

# RHEL 5 # ——————————————————————————————

# To force users to enter password in Single User mode, add following line to /etc/inittab:

~:S:respawn:/sbin/sulogin

# The changes to this file takes effect after a system reboot

# To make init re-read the /etc/inittab without rebooting the system, type the command

/sbin/init q

# RHEL 6 # ——————————————————————————————

[…]

maybe-recordio

Install and use maybe-recordio script

Maybe-recordio is a little script written by John M. Simpson which makes it possible for an SMTP service to selectively enable recordio for certain IPs, so you can see what they are doing without filling up your log files with a lot of extra stuff you don’t need to see […]

qlogtools

Install qlogtools

This package is a set of tools that are useful in analyzing or producing logs from qmail and other packages. Those tools are mainly useful if you plan to make use of qmailanalog or other mail log analyzer

A the end, you ‘ll have following additional commands in /usr/local/bin/

multipipe – Supervise […]

mtrack qmail

cd /downloads/scripts/ wget http://qmail.jms1.net/scripts/mtrack wget http://qmail.jms1.net/scripts/strack chmod 751 mtrack strack cp /downloads/scripts/mtrack /var/qmail/bin/ cp /downloads/scripts/strack /var/qmail/bin/

ln -s /var/qmail/bin/mtrack /usr/bin/ ln -s /var/qmail/bin/strack /usr/bin/

Use it cat /var/log/qmail/qmail-send/current | mtrack cat /var/log/qmail/qmail-smtpd/current | strack cat /var/log/qmail/qmail-smtpdssl/current | strack

You should have such result @400000004e46646a134478e4 starting delivery 27: msg 654065 to remote nospam@test.com @400000004e46647f195ff2e4 delivery 27: […]