First of all, in order to study for this exam, I need to be aware of what I’m not really familiar with and then make sure I know enough of it (or what to look for in man pages) to get through those sections. I’m hoping the process of writing this down will help me remember when I get to the test. In no particular order they are:
SELinux (Security Enhanced Linux): Adds context to files, directories and processes. The default targeted policy from Redhat focuses on networked processes and security significant files to confine. To check if selinux is enabled, type “getenforce”. This is very helpful to keep in mind because if you don’t make sure to set the context of a file/directory things may not work and the normal troubleshooting path won’t help you. Check your logs (/var/log/messages and /var/log/audit/audit.log) for details.
- ls -Z # Lists contexts of files in current directory
- ps -Z # Lists context of running processes. May be combined with other options
- chcon # Changes context of file/directory
- restorecon # Will restore appropriate contexts to files in given directory if part of OS and installed in standard location.
- semanage or sealert or setroubleshoot # (All seem to be GUI apps to diagnose problems)
- semanage fcontext -l # List selinux contexts. Can replace fcontext with a number of other object types. See man page for options.
Sysctl (Persistant Kernel Configuration): Modifies kernel configuration settings. To figure out what settings are available and what they do you can type “sysctl -a” find the particular setting and look it up in the kernel-doc Documentation (/usr/share/kernel-doc-2.6.18/Documentation/networking/ip-sysctl.txt or similar).
- sysctl -a # Lists all available settings
- sysctl -w net.ipv4.ip_forward=1 # Changes kernel setting on the fly. Make permanaent by adding to /etc/sysctl.conf
LVM (Logical Volume Management): The big piece here is to remember that the base unit of an LVM is a physical volume (pv). One or more phyiscal volumes can then be added to a volume group (vg). Finally one or more logical volumes (lv – what the OS sees) can be created from a volume group. To query what has been created you can always use the display command prefixed with the object type (example: lvdisplay). Remember the following commands when looking to grow or reduce the size of an LVM volume:
- vgextend/lvextend (Grow volume group/logical volume)
- vgreduce/lvreduce (Reduce volume group/logical volume)
- resize2fs (Resize filesystem) – Note: To shrink a filesystem you must unmount the volume
- pvmove (move extents off specified phyiscal volume so you can remove it from volume group)
ACL (Access Control Lists): Allows greater granularity to be set for controlling access to files and directories. Remember the following commands:
- getfacl – Get file access control
- setfacl – Set file access control
Helpful reminders:
- rpm -qd [packagename] # Returns location of documentation for that package
- yum grouplist # Lists names of package groups (very helpful for installing things like Gnome)
- mkinitrd –with=raid1 /boot/initrd-raid1-$(uname -r).img $(uname -r) # Create a new RAM disk file with the raid1 driver. Note: when you specify the ‘–with’ option that module must be in the running kernel.
Items for review:
- Quotas
- ACLs
- VNC
- ip/nmap/IPV6
- TCPwrappers/iptables
- Unit 9 on (sorry, was super sleepy, and bored)