Skip to main content

Posts

Showing posts from May, 2012

Log Levels In Os's

When network devices run into problems they generate error messages. In a lot of cases, where those error messages go is up to you. Devices like servers (including Windows servers with the utility mentioned below), routers, switches, and even some HP JetDirect print server cards support the use of a "syslog" server. A syslog server is kind of a central repository for log messages as a way for you to centralize your monitoring of network systems and devices. It's a client/server type of setup where the devices are the "clients".  When set up to use a syslog server, devices will send their log messages over the network wire to the syslog server rather than recording them in a local file or displaying them. By default Cisco routers and switches will typically write them to the console screen provided you have a console session open. But since you don't have a console session open most of the time, it's a good idea to change where these messages are sent.  ...

File Types and Thier Uses

File types in Linux Explained “ How many types of files are there in Linux/Unix and what are they? ” This is a common question to every person who starts learning Linux. Why is it important to know file types? Ans :   This is because Linux will consider every thing as file. So when ever you start working on Linux/Unix box you have to deal with different file types to effectively manage them. How many types of file are there? By default Unix have only 3 types of files.. They are. 1. Regular files 2. Directory files 3. Special files(This category is having 5 sub types in it.) So in practical we have total 7 types of files are there. And in Solaris we have 8 types. Here are those files type. And you can see the file type indication at leftmost part of “ls -l” command 1. Regular file(-)  2. Directory files(d)  Special files  3. Block file(b)  4. Character device file(c)  5. Named pipe file or just a pipe file(p)  6. Sym...

CryptSetup with encrypted file.

Cryptsetup uses dm-crypt to encrypt a disk at the partition level.  In RHEL, cryptsetup is used with Linux Unified Key Setup (LUKS), a disk encryption specification. Mounting a LUKS encrypted partiton requires a passphrase, which can either be passed in a file or via the command line. Read more about dm-crypt here. Anyway to use crypsetup, you first must have a free partiton on a disk. In this instance I am using /dev/sdc1, which is a freeagent external usb drive. First initialize the LUKS partition. My target is /dev/sdc1 #cryptsetup luksFormat /dev/sdc1 Then open the LUKS partition setup the dev mapper device. The command below creates /dev/mapper/freeagent #cryptsetup luksOpen /dev/sdc1 chauhan Create a passkey file if you want the device to be able to automount at boot.  #vi /root/my.key && chmod 600 /root/my.key Make cryptsetup aware of the key #cryptsetup luksAddKey /dev/sdc1 /root/my.key Dont forget to make a filesystem #mkfs -t ext...

OpenLdap Configration in RedHat Enterprise Linux 5.4

LDAP Server Configuration LDAP Configuration in RHEL 5.4 Release: RedHat Enterprise Linux 5.4 Problem: LDAP Configuration in RHEL 5.4 Solution: Assumptions: Domain Name                : example.com Host Name                    : server IP Address                     : 192.168.0.199 Server Side Configuration: 1)      Install the required RPMs for LDAP server a.       Openldap b.       Openldap-devel c.       Openldap-clients d.       Openldap-servers e.       Nss_ldap 2)      Create a dedicated directory for putting all database information, with the ownership of “ldap”. Default directory is /var/lib/ldap. # mkdir /var/lib/ldap/example.com # chown ldap:ldap /var/lib/ldap/example.com 3)      Create an ...