Content One: Display all users’ password login, password deny and last-login
# lslogins
Content Two: Display a user’s password login, password deny and last-login
# lslogins <user>
# lslogins
# lslogins <user>
1) Default for Rocky Linux, AlmaLinux, CentOS, Red Hat
2) Designed to protect the entire operating system
1) Default for openSUSE, Debian, Ubuntu, SLE
2) Designed to protect specific applications, limit the resources that particular application can use
3) Uses path names
Red Hat Enterprise Agreements and Product Appendices official website
https://www.redhat.com/en/about/agreements
# vim /etc/hosts
Add the following:
......
<Redhat Satellite IP address> <Redhat Satellite Server FQDN>
# curl --insecure --output katello-ca-consumer-latest.noarch.rpm https://<Redhat Satellite Server FQDN>/pub/katello-ca-consumer-latest.noarch.rpm
# yum -y localinstall katello-ca-consumer-latest.noarch.rpm
# subscription-manager register --org="<organization>" --activationkey="<activation key>"
RHEL 7:
# subscription-manager repos --enable=rhel-\*-satellite-tools-\*-rpms
RHEL 8:
# subscription-manager repos --enable=satellite-tools-\*-rhel-\*-rpms
# subscription-manager repos --disable=satellite-tools-\*-rhel-\*-eus-rpms
# yum -y install katello-host-tools; yum -y install katello-host-tools-tracer; yum -y install katello-agent
# subscription-manager identity
# subscription-manager list --consumed
# a=1
# b=
(Add: let a be 1 and B be null as an example)
# var1=${a:-no}
# var2=${b:-no}
(
Add:
If a is null, var1 is no, otherwise var1 is equal to a
If B is null, var2 is no, otherwise var2 is equal to B
)
# echo $var1
1
# echo $var2
no
(
Add:
The value of a is 1, so var1 is 1
The B is null, so var2 is no
)
# vim var_default.sh
Create the following:
#!/bin/bash
var_default="${1:-no}"
echo $var_default
(Add:If the variable of $1 is null, then var_default is no, otherwise var_default is equal to $1, and print it out as an example)
# bash var_default.sh
no
# bash var_default.sh 1
1
# bash var_default.sh 2
2
# bash var_default.sh 3
3