1. How to reset root password on RHEL8 server?
-> Reboot your system
-> On your boot (timer) menu, press arrow key
-> Press e to edit
-> Go to the link starts with linux
-> Go to end of the line by pressing end on your keyboard
-> type - rd.break enforcing=0
-> press ctrl+x to save and exit
-> You will be at the prompt menu # Emergency mode
-> Mount sysroot # mount -o remount,rw /sysroot/
# chroot /sysroot
# passwd root
autorelabel
-> Exit exit at the prompt
-> Login to your system and run
# restorecon /etc/shadow
2. Assign static IP address
either use nmcli command line tool or
use manually
# cd /etc/sysconfig/network-scripts
# vi ifcfg-eth0 (interface name)
BOOTPROTO="static"
ONBOOT="yes"
IPADDR=192.168.100.100
NETMASK=/24
GATEWAY=192.168.100.1
DNS1=192.68.100.1 - DNS server ip
# systemctl restart network
# systemctl restart NetworkManager
# cat /etc/resolv.conf
# netstat -rn
# ping gateway
# ping google.com # if access to outside @internet will allowed.
# ssh hostname (IP)
3. Disable firewall, enable SElinux
# systemctl stop firewalld
# systemctl disable firewalld
# getenforce
# setenforce 0
# vi /etc/selinux/config
SELINUX=enforcing
4. Set up repo
# vi exam.repo
[examrepo1]
baseurl=http://path
gpgcheck=0
[examrepo2]
baseurl=http:url
gpgcheck=0
# yum clean all
# yum repolist
# yum search httpd
# yum install httpd
5. Assign hostname to your system
# hostnamectl -h
# hostnamectl set-hostname myhost.eg.com
Wednesday, July 28, 2021
RHCSA exam prep notes
Subscribe to:
Post Comments (Atom)
Git branch show detached HEAD
Git branch show detached HEAD 1. List your branch $ git branch * (HEAD detached at f219e03) 00 2. Run re-set hard $ git reset --hard 3. ...
-
snmpconfig command allow you to managge snmpv1/v3 agent configuration on SAN switch. Event trap level is mapped with event severity level....
-
Firmware upgrade on HPE SuperDom Flex 280 - prerequisites tasks a. Set up repo b. Upload firmware to your webserver 1. For foundation so...
-
Disabling the Telnet protocol on Brocade SAN switches By default, telnet is enabled on Brocade SAN switches. As part of security hardening o...
No comments:
Post a Comment