RHEL9: Difference between revisions
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=New Deployment= | =New Deployment= | ||
A collection of common things to do on almost any new RHEL deployment. | |||
==Software To Install== | |||
<code>subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms</code> | |||
<code>dnf install <nowiki>https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm</nowiki></code> | |||
<code>dnf install vim wget tmux htop iftop net-tools bind-utils traceroute tcpdump nmap mtr net-snmp-utils rsync git lsof usbutils yum-utils unzip python3 open-vm-tools nfs-utils -y</code> | |||
<code>dnf group install "Development Tools"</code> | |||
=Networking= | =Networking= | ||
Line 10: | Line 22: | ||
In this example, I was able to successfully bond two links to a Juniper EX3300 using LACP (802.3ad): | In this example, I was able to successfully bond two links to a Juniper EX3300 using LACP (802.3ad): | ||
{{Info|Be sure to delete any existing connection profiles that are applied to any interfaces you plan to use as slaves.}} | |||
<code>nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=802.3ad,lacp_rate=fast"</code> | <code>nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=802.3ad,lacp_rate=fast"</code> | ||
Line 20: | Line 34: | ||
<code>nmcli connection modify bond0 ipv4.addresses '10.144.30.20/24' ipv4.gateway '10.144.30.1' ipv4.dns '10.144.30.4,10.150.30.2' ipv4.dns-search 'lambnet.us' ipv4.method manual</code> | <code>nmcli connection modify bond0 ipv4.addresses '10.144.30.20/24' ipv4.gateway '10.144.30.1' ipv4.dns '10.144.30.4,10.150.30.2' ipv4.dns-search 'lambnet.us' ipv4.method manual</code> | ||
===Verification=== | |||
<code>cat /proc/net/bonding/bond0</code> | |||
Also, unplug one member cable of the bond at a time while performing a ping, to confirm link stays up. | |||
===Sources=== | ===Sources=== | ||
Line 25: | Line 45: | ||
[https://www.kernel.org/doc/Documentation/networking/bonding.txt https://www.kernel.org/doc/Documentation/networking/bonding.txt] | [https://www.kernel.org/doc/Documentation/networking/bonding.txt https://www.kernel.org/doc/Documentation/networking/bonding.txt] | ||
=Disk/Filesystem= | |||
===Erase a Disk=== | |||
<code>dd if=/dev/zero of=/dev/sdx status=progress && sync</code> | |||
=Users & Passwords= | |||
===Show Password Expiration, etc.=== | |||
<code>chage -l bob</code> | |||
<code>passwd --status bob</code> | |||
===Remove Password Expiration=== | |||
<code>chage -E -1 bob</code> | |||
===Expire A Password Immediately=== | |||
<code>chage -E 0 bob</code> | |||
===Remove Password Validation Checking=== | |||
<code>chage -m 0 -M -1 bob</code> | |||
===Disable a User's Shell (prevents login)=== | |||
<code>usrmod -s /sbin/nologin bob</code> | |||
===List Sudo Privileges=== | |||
<code>sudo -l</code> |
Latest revision as of 18:51, 11 February 2024
New Deployment
A collection of common things to do on almost any new RHEL deployment.
Software To Install
subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf install vim wget tmux htop iftop net-tools bind-utils traceroute tcpdump nmap mtr net-snmp-utils rsync git lsof usbutils yum-utils unzip python3 open-vm-tools nfs-utils -y
dnf group install "Development Tools"
Networking
Bonding
A network bond is a method to combine or aggregate physical and virtual network interfaces to provide a logical interface with higher throughput or redundancy. In a bond, the kernel handles all operations exclusively. You can create bonds on different types of devices, such as Ethernet devices or VLANs.
Example
In this example, I was able to successfully bond two links to a Juniper EX3300 using LACP (802.3ad):
Note Info: Be sure to delete any existing connection profiles that are applied to any interfaces you plan to use as slaves.
nmcli connection add type bond con-name bond0 ifname bond0 bond.options "mode=802.3ad,lacp_rate=fast"
nmcli connection modify bond0 connection.autoconnect-slaves 1
nmcli connection add type ethernet slave-type bond con-name bond0-port0 ifname enp129s0f0 master bond0
nmcli connection add type ethernet slave-type bond con-name bond0-port1 ifname enp129s0f1 master bond0
nmcli connection modify bond0 ipv4.addresses '10.144.30.20/24' ipv4.gateway '10.144.30.1' ipv4.dns '10.144.30.4,10.150.30.2' ipv4.dns-search 'lambnet.us' ipv4.method manual
Verification
cat /proc/net/bonding/bond0
Also, unplug one member cable of the bond at a time while performing a ping, to confirm link stays up.
Sources
https://www.kernel.org/doc/Documentation/networking/bonding.txt
Disk/Filesystem
Erase a Disk
dd if=/dev/zero of=/dev/sdx status=progress && sync
Users & Passwords
Show Password Expiration, etc.
chage -l bob
passwd --status bob
Remove Password Expiration
chage -E -1 bob
Expire A Password Immediately
chage -E 0 bob
Remove Password Validation Checking
chage -m 0 -M -1 bob
Disable a User's Shell (prevents login)
usrmod -s /sbin/nologin bob
List Sudo Privileges
sudo -l