The system log daemon is responsible for logging the system messages generated by applications or kernel. The system log daemon also supports the remote logging. The messages are differentiated by facility and priority. In principle, the logs handled by syslog are available in the /var/log/ directory on Linux system : # ls /var/log acpid cron.1 maillog.3 rpmpkgs.3 spooler.3 anaconda.log cron.2 maillog.4 rpmpkgs.4 … [Read more...] about CentOS / RedHat : Beginners guide to log file administration
RedHat / CentOS : How to create interface bonding Interface Bonding as we all know is very useful in providing the fault tolerance and increased bandwidth. We can change the active slave interface of bonding without interrupting the production work. In the example below we have the interface bonding bond0 with 2 slaves em0 and em1 (em1 being the active slave). We will be replacing slave em0 with new slave em2. # cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, … [Read more...] about RedHat / CentOS : How to change currently active slave interface of bonding online
Why aggregate network interfaces (interface bonding)? The two important reasons to create an interface bonding are : 1. To provide increased bandwidth 2. To provide redundancy in the face of hardware failure One of the pre-requisites to configure a bonding is to have the network switch which supports Etherchannel (which is true in case of almost all switches). Bonding modes Depending on your requirement, you can set the bonding mode to any of the below 7 modes. The bonding mode can be … [Read more...] about Red Hat / CentOS : How to create interface / NIC bonding
SELinux modes SELinux gives that extra layer of security to the resources in the system. It provides the MAC (mandatory access control) as contrary to the DAC (Discretionary access control). Before we dive into setting the SELinux modes, let us see what are the different SELinux modes of operation and how do they work. SELinux can operate in any of the 3 modes : 1. Enforced : Actions contrary to the policy are blocked and a corresponding event is logged in the audit log. 2. Permissive : … [Read more...] about How to enable/disable SELinux Modes in RHEL/CentOS
Why we need ACLs ? Every file on any UNIX file will have a owner/group and set of permissions. Imagine a case when multiple users need access to the same file and the users are from different groups. The file access control lists (FACLs) or simply ACLs are the list of additional user/groups and their permission to the file. How to know when a file has ACL attached to it It is very easy to know when a file has a attached ACL to it. ls -l command would produce a output as show below. # ls … [Read more...] about UNIX/Linux : Access control lists (ACLs) basics
There are 3 special permission that are available for executable files and directories. These are : 1. SUID permission 2. SGID permission 3. Sticky bit Set-user Identification (SUID) Have you ever thought, how a non-root user can change his own password when he does not have write permission to the /etc/shadow file. hmmm... interesting isn't it? Well to understand the trick check for the permission of /usr/bin/passwd command : # ls -lrt /usr/bin/passwd -r-sr-sr-x 1 root sys … [Read more...] about What is SUID, SGID and Sticky bit ?
Inodes Every file in a Linux/Unix operating system has an inode associated with it with an exception of Solaris ZFS, which does not have inodes. Inodes basically work very similar to an appendix of a book. Every Inode will have below information about the file. 1. owner 2. permissions 3. size 4. time of last access 5. creation time 6. group id 7. Pointers to data blocks associated with the file content Note: Inode does not provide filename however. File Types There are basically 5 … [Read more...] about Unix file basics : Inode, Soft Vs Hard link, Device files, Named pipes