Skip to content

Latest commit

 

History

History
130 lines (85 loc) · 4.32 KB

RHEL important files and settings.md

File metadata and controls

130 lines (85 loc) · 4.32 KB

RHEL imporatnt file cheatsheet


The following document is designed to act as a centralized source for all relevant files and some important settings for the RHCSA exam.

General files/Env files

  • /etc/profile - mother of all environment files
  • /etc/bashrc - file for all functions and aliases
  • ~/.bash_profile - user specific file where login shell variables can be defined
  • ~/.bashrc - user specific file where subshell variables can be defined
  • /etc/shadow - file that stores the encrypted password of users among other user information
  • /etc/passwd - file that stores user info such as id, groups and shell
  • /etc/login.defs - contains information regarding

sudo

  • etc/sudoers - file that specifies who can use sudo command. Edit using visudo

  • /etc/sudoers.d/ - location for dropping in files[username for filename to give specific perms]

  • /etc/skel/ - files that need to be created for new users

General Networking

  • /etc/resolv.conf - file that configures the domain name resolver
  • /etc/hostname - contains the hostname
  • /etc/hosts - static table lookip for hostnames/maps hostnames to ipaddresses
  • /etc/nsswitch.conf - config file that determines loop destination and order

NetworkManager

  • /etc/NetworkManager/NetworkManager.conf - main config file for NetworkManager
  • /etc/NetworkManager/system-connections/ - The location of persistent profiles.

dnf

  • /etc/yum.repos.d/ - location for .repos file for establishting repos
  • /var/log/dnf.rpm.log - history file
  • /var/log/dnf.log - log file for the dnf command

crond

  • /etc/cron.allow - if present, specifies which users can access cron services
  • /etc/cron.deny - if present, specifies which users cannot access cron services

tuned

  • /etc/tuned - location for all the profiles for the tuned service.

systemd

  • /etc/systemd/system/ - location for creating a custom file for a custon timers and services
  • /usr/lib/systemd/system/ - location for all systemd services.

Task Scheduling

  • systemd timers

    • /etc/systemd/system/ - Location for creating .service and .timer files
  • cron

    • /etc/crontab - Location for the main managed config file
    • /etc/cron.d/ - Location for drop in files
    • /etc/cron.{hourly, daily, weekly, monthly} - Location used for scripts that need to be scheduled on a regular basis
    • /var/log/cron - cron logs
  • anacron /etc/anacrontab - Config file

Temporary file management

  • systemd-tmpfiles
    • /usr/lib/tmpfiles.d/ - rpm provided files for tmp management
    • /etc/tempfiles.d/ - custom config
    • /run/tmpfiles.d/ - system generated configs

Logging

  • rsyslog

    • /etc/rsyslog.conf - main config file for rsyslog
    • /etc/rsyslog.d/ - location for drop-in files
    • /var/logs/ - location for most logs
  • systemd journal settings - /var/log/journal - location for journals to be stored after persistence is enabled. Set ownership to 2755

    • For persistence
      • /etc/systemd/journal.conf
        • Storage=auto
          • /var/log/journal
        • Storage=volatile
          • /run/log/journal
        • Storage=none
  • logrotate

    • /etc/logrotate.conf - main config files for logrotate
    • /etc/logrotate.d/

disk management

  • fstab

    • /etc/fstab - file for configuring mounting permanence
  • /etc/systemd/generator - location for all the mount files that are being generated by systemd

boot files

  • /etc/default/grub - file specifying boot properties

  • /boot/efi/EFI/redhat/grub.cgf - file containing boot information for a RHEL installation using EFI

  • /boot/grub2/grub.cfg - file containing boot information for a RHEL installion using mbr

  • /.autorelabel - file used by SELinux for relabeling the filesystem.

ssh

  • /etc/ssh/sshd_config - main config file for sshd

SELiux

  • /etc/systemconfig/seliux - config file for SELinux . Link to config file in /etc/selinux/
  • /var/log/audit/audut.log - contains SELinux permission logs. Look for AVC

containers

  • /etc/containers/registeries.conf - config file for containers

  • /proc/self/uid_map - used along with podman unshare to verify UID mapping

  • ~/.config/systemd/user - directory to generate a .service file from podman in.