yum history
yum history undo NUM
yum history redo NUM
yum provides "*/foocmd"
Workbook 2, chapter 7 (providing file-based storage), page 173
authconfig
, otherwise it may configure a next-best alternative and not do what you think it should do when you reconfigure with authconfig
after the fact.yum install sssd auhconfig-gtk krb5-workstation autofs
authconfig-gtk
or authconfig-tui
example.com
EXAMPLE.COM
classroom.example.com
classroom.example.com:/home/guests
# /etc/auto.master
/home/guests /etc/auto.ldapguests
# /etc/auto.ldapguests
* -fstype=nfs,rw,async,hard,intr classroom.example.com:/home/guests/&
yum -y install cifs-utils
cifscreds add REMOTE_HOSTNAME
- Assumes the current local usernamemount -o multiuser,sec=ntlmspp,username=MYUSERNAME //serverX/myshare /mnt/multiuser
getfacl
, setfacl
, chacl
Workbook 2, chapter 3 (network port security), page 71.
--direct
argument, allowing more flexibilty to create the underlaying iptables rules.firewalld-cmd --permanent
argument.--add-rich-rule
, but are applied to a specific firewalld zone (or the default zone if no zone is specified by with --zone=ZONE
argument.firewalld-cmd --permanent
argument.firewall-cmd --permanent --zone=dmz --add-rich-rule='rule family=ipv4 source address=172.25.N.10/32 service name=http log level=notice prefix="NEW HTTP " limit value="3/s" accept'
The SNAT target requires you to give it an IP address to apply to all the outgoing packets. The MASQUERADE target lets you give it an interface, and whatever address is on that interface is the address that is applied to all the outgoing packets. In addition, with SNAT, the kernel's connection tracking keeps track of all the connections when the interface is taken down and brought back up; the same is not true for the MASQUERADE target.
firewall-cmd --permanent --zone=ZONE --add-masquerade
- Will masquerate any packets sent to the firewall from clients defined in the sources for that zone (both interfaces and subnets) that are not addressed to the firewall host itself.--add-rich-rule
gives you more control over what client source addresses will me masqueraded: firewall-cmd --permanent --zone=ZONE --add-rich-rule='rule family=ipv4 source address=192.168.0.0/24 masquerade'
firewall-cmd --permanent --zone=ZONE --add-forward-port="port=ORIGINAL_PORTNUMBER:proto=PROTO[:toport=NEWDEST_PORTNUMBER][:toaddr=NEWDEST_IP]
--add-rich-rule
like so: firewall-cmd --permanent --zone=ZONE --add-rich-rule='rule family=ipv4 source address=192.168.0.0/26 forward-port port=80 protocol=tcp to-port=8080'
Workbook 2, chapter 3 (network port security), page 81.
system-config-selinux
(from the policycoreutils-gui
).getenforce
, setenforce 0
and setenforce 1
./etc/selinux/config
or /etc/sysconfig/selinux
.sestatus
command.semanage fcontext -l
- List file context definitionssemanage port -l
- List port context definitions/var/log/messages
.sealert
to find out the details.sealert -a /var/log/audit/audit.log
semanage port -a -t http_port_t -p tcp 8089
semanage
(8), semanage-port
(8), system-config-linux
(8).yum -y install selinx-policy-devel
for a large number of SELinux port type/label definitions.Workbook 1, chapter 5 (SELinux permissions), page 111.
[root@cp1 ~]# ls -Z anaconda-ks.cfg
-rw-------. root root system_u:object_r:admin_home_t:s0 anaconda-ks.cfg
getsebool -a
and setsebool
setsebool BOOLEAN on
setsebool -P BOOLEAN on
- persist change through rebootssemanage boolean -l
chcon
and restorecon
semanage fcontext -a -t admin_home_t '/common(/.*)?'
- sets the default type context for /common
and all files and sub-directories to be admin_home_t
runcon
will run a process under a specific context.Workbook 2, page 226.
yum groupinstall mariadb mariadb-client
mysql_secure_installation
echo -e "[mysqld]\nskip-networking=1\n" > /etc/my.cnf.d/skip-networking.cnf
help create user
, help grant
...flush privileges;
flush tables with read lock; unlock tables;