Important paths Flashcards
Set a users account to expire now and prompt to change on next login
Passwd -e user
Chage -M 0 user
Create 5 T vdo drive
Format xfs the mount permanently to /data
First make sure it installed
Yum install know-kvdo vod
vod create —name =vdo1 —device /dev/sdg1 —vdoLogicalSize=5T
Mkfs.xfs -K /dev/mapper/vdo1
vi /etc/fstab
/dev/mapper/vdo1 /data xfs x-systemd.requires =vdo.service 0 0
Change root password if you don’t know it can’t login
Edit grub rd.break
Ctrl + x
Mount -o remount,two /sysroot
Chroot /sysroot
Passwd
Touch /.autorelabel
Exit exit
Add group owner to every file and directory in directory /dirname and make sure no one in group is able to delete files created in folder
Chmod g+s /dirname
Chmod + t /dirname
Give stacy rw acl permissions on a secure file or directory
Give another group acl rwx permission on directory
Setfacl -m u:stacy:rw file name
Setfacl -m d:u:stacy:rw /dirname
Setfacl -m d:g:group:rwx /dirname
Set time zone and ntp service make sure it’s running
configure chrony to user time.google.com server
Timedatectl set-default “America/New_York”
Timedatectl set-ntp true
Systemctl status chronyd
first downlownd and install chrony
then edit the file
/etc/chrony.conf
pool iburst
enter the address they give you
pool time.google.com iburst
make sure its running
systemctl start chronyd
systemctl enable chronyd — makes it persistent
systemctl status chronyd
or
systemctl enable chronyd –now
chronyc sources – will list all the sources in your pool
Set default boot to multiuser
Systemctl set-default multi-user. Target
Edit grub to boot on scilenced
Vi/etc/default/grub
Grub2-mkconfig -o /boot/grub2/grub.cfg
Reboot
Change selinux to enforcing permanently
Find / - name selinux
/etc/selinux/config
Change to enforcing
Reboot
Sestatus
Create an archive
Tar -cvf new.tar file name to backup
Tar -cvzf new.tar.gz file name to backup
Set a static connection with your settings recieved from dhcp
Nmcli c add con-name static ifname device name enps03 ip4 192.178.1.99/24 gw4 192.168.1.1 autoconnect true type Ethernet
Nmcli con mod static ipv4.dns 8.8.8.8
Nmcli con up static
Ping gw
Ping Google
Create a new user with uid 1099 and another user mike with no login
User add -u 1099 rick
User add -s /sbin/no login Mike
setup autofs /autofs/nfsshare for 192.168.1.65:/home/automount
yum install autofs -y
check nfs shares
showmount -e 192.168.1.65
mkdir -p /autofs/nfsshare
# vi /etc/auto.master /autofs /etc/auto.julien -timeout=120 Or # vi /etc/auto.master.d/julien.autofs /autofs /etc/auto.julien -timeout=120
# vi /etc/auto.julien nfsshare -fstype=nfs4,rw,sync 192.168.1.65:/home/automount
systemctl start autofs
systemctl enable autofs
systemctl status autofs
ll /autofs/nfsshare
cd /autofs/nfsshare
create a thin provisioned 5T drive and mount to data directory
# yum install -y vdo kmod-kvdo # systemctl enable --now vdo
vdo create –name=vdo1 –device=/dev/sdb –vdoLogicalSize=5T
mkfs.xfs -K /dev/mapper/vdo1 # mkdir /data # vi /etc/fstab #/dev/mapper/vdo1 /data xfs x-systemd.requires=vdo.service 0 0 # mount -a
reboot
Setup tuned to the recommended settings
Yum install tuned
Systemctl enable tuned —now
Tuned-adm recommended
tuned-adm profile virtual-guest
tuned-admin active