RHEL 7 – RHCSA Notes (Cheat Sheets) 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 […]
RHEL 7 – RHCSA Notes – Create and manage Access Control Lists (ACLs)
RHEL 7 – RHCSA Notes (Cheat Sheets) The file access control lists (FACLs) or simply ACLs are the list of additional user/groups and their permission to the file. Although the default file permissions does their jobs perfectly, it does not allow you to give permissions to more than one user or one group on the […]
RHEL 7 – RHCSA Notes : Change passwords and adjust password aging for local user accounts
RHEL 7 – RHCSA Notes (Cheat Sheets) Password configuration password aging requires users to change their password periodically. Use the chage to configure password expiration. The syntax is : # chage [options] user_name – When you fire the command chage, the currently set options are displayed as well. # chage oracle Changing the aging information […]
RHEL 7 – RHCSA Notes : Create, delete, and modify local groups and group memberships.
RHEL 7 – RHCSA Notes (Cheat Sheets) Group administration – Use the groupadd command to add a new group : # groupadd [options] group_name – Use the groupmod command to modify an existing group : # groupmod [options] group_name – Use groupdel to delete the group. You can remove a group even if there are […]
RHEL 7 – RHCSA Notes : Create, delete, and modify local user accounts
RHEL 7 – RHCSA Notes (Cheat Sheets) Adding a user account Use the useradd command to add new user : # useradd [options] [username] The default settings for new user can viewed and modified using the -D option : # useradd -D GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel CREATE_MAIL_SPOOL=yes For example, to change the default […]
RHEL 7 – RHCSA Notes : Configure a system to use time services
RHEL 7 – RHCSA Notes (Cheat Sheets) RHEL 7 has 3 command-line utilities to configure the system date and time: 1. date 2. hwclock 3. timedatectl date command Use the date command to display or set the system date and time. Run the date command with no arguments to display the current date and time: […]
RHEL 7 – RHCSA Notes : Schedule tasks using at and cron
RHEL 7 – RHCSA Notes (Cheat Sheets) – Linux can run tasks automatically, and comes with automated tasks utilities: cron, anacron, at, batch. – cron jobs can run as often as every minute. – A scheduled cron job is skipped if the system is down. – anacron can run a job only once a day. […]
RHEL 7 – RHCSA Notes : Start, stop, and check the status of network services.
RHEL 7 – RHCSA Notes (Cheat Sheets) systemd service units – Previous versions of Oracle Linux use scripts in the /etc/rc.d/init.d directory to control services. – In Oracle Linux 7, these scripts have been replaced by systemd service units. – Use the systemctl command to list information about service units. To list all loaded service […]
RHEL 7 – RHCSA Notes : Create hard and soft links.
RHEL 7 – RHCSA Notes (Cheat Sheets) Soft links As shown in the diagram soft links or symbolic links simply points to another file. It only contains the pathname of the file to which it is pointing 1. Creation method # touch file # ln -s file link # ls -l -rw-r–r– 1 root root […]
RHEL 7 – RHCSA Notes – input / output redirection
RHEL 7 – RHCSA Notes (Cheat Sheets) Three standard file descriptors : 1. stdin 0 – Standard input to the program. 2. stdout 1 – Standard output from the program. 3. stderr 2 – Standard error output from the program. Purpose Command redirect std output to filename > filename or 1> filename append std out to filename […]