Disk Partitioning and Mounting File System

[root@partitioning ~]# lsblk  NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT loop0    7:0    0  3.6G  1 loop /mnt/iso sda      8:0    0   20G  0 disk ├─sda1   8:1    0  300M  0 part /boot └─sda2   8:2    0 17.7G  0 part / sr0     11:0    1 1024M … Continue reading Disk Partitioning and Mounting File System

filepermissions

Introduction Linux is a multi-user OS that is based on the Unix concepts of file ownership and permissions to provide security, at the file system level. If you are planning improving your Linux skills, it is essential that have a decent understanding of how ownership and permissions work. There are many intricacies when dealing with … Continue reading filepermissions

firewall(iptables)

This Linux based firewall is controlled by the program called iptables to handles filtering for IPv4, and ip6tables handles filtering for IPv6. I strongly recommend that you first read ourquick tutorial that explains how to configure a host-based firewall called Netfilter (iptables) under CentOS / RHEL / Fedora / Redhat Enterprise Linux. This post list … Continue reading firewall(iptables)

samba

[root@server-rhel6 ~]#yum install -y samba [root@server-rhel6 ~]#mkdir /sharedrepo [root@server-rhel6 ~]#groupadd staff [root@server-rhel6 ~]#chgrp -R staff /sharedrepo/ [root@server-rhel6 ~]#chmod -R 777 /sharedrepo/ [root@server-rhel6 ~]#cd /sharedrepo/ [root@server-rhel6 ~]#touch one [root@server-rhel6 ~]#chcon -R -t samba_share_t /sharedrepo/ [root@server-rhel6 ~]#semanage fcontext -a -t samba_share_t /sharedrepo/ [root@server-rhel6 ~]#yum provides /usr/sbin/semanage [root@server-rhel6 ~]#yum install policycoreutils-python [root@server-rhel6 ~]#setsebool -P samba_enable_home_dirs on [root@server-rhel6 ~]#useradd … Continue reading samba

Log-Rotation

Managing log files effectively is an essential task for Linux sysadmin. Rotate the log file when file size reaches a specific size Continue to write the log information to the newly created file after rotating the old log file Compress the rotated log files Specify compression option for the rotated log files Rotate the old … Continue reading Log-Rotation

RAID (Redundant Array of InExpensive Disks) & Logical Volume Manager

[root@RAID ~]# lsblk  NAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT loop0    7:0    0  3.6G  1 loop /mnt/iso sda      8:0    0   20G  0 disk ├─sda1   8:1    0  300M  0 part /boot ├─sda2   8:2    0 17.7G  0 part / ├─sda3   8:3    0  104M  0 … Continue reading RAID (Redundant Array of InExpensive Disks) & Logical Volume Manager

backup & recovery

Backup and Recovery Full Backup Full backup is a method of backup where all the files and folders selected for the backup will be backed up.  When subsequent backups are run, the entire list of files and will be backed up again. The advantage of this backup is restores are fast and easy as the … Continue reading backup & recovery

quotas

Disk quotas are commonly used by ISPs, by Web hosting companies, on FTP sites, and on corporate file servers to ensure continued availability of their systems. Quotas are used to limit a users or a group of users ability to consume disk space. This prevents a small group of users from monopolizing disk capacity and … Continue reading quotas

user&group administration

User and Group Administration To add a new user account, you can run either of the following two commands as root. adduser tom useradd jerry [root@machine1 ~]# cat /etc/passwd | grep tom tom:x:501:501::/home/tom:/bin/bash [root@machine1 ~]# cat /etc/passwd | grep jerry jerry:x:502:502::/home/jerry:/bin/bash ----------------------------------------------------------------------------------------------------------------------- View a List of All Groups To view all the groups on the … Continue reading user&group administration

ssh-keys concept

SSH-KEYGEN(password less authentication) ssh-keygen is a Unix utility that is used to generate, manage, and convert authentication keys for ssh authentication. With the help of the ssh-keygen tool, a user can create passphrase keys for both SSH protocol version 1 and version 2. ssh-keygen creates RSA keys for SSH protocol version 1 and RSA or … Continue reading ssh-keys concept