Skip to content

Redhat

Recover Root Password

Na console

send ctrl-alt-del
press "e" => TO Edit
Na linha linux16 -- No final da linha adicionar rd.break
press "ctrl-x"
mount -o remount,rw /sysroot
cd /sysroot
chroot .
touch .autorelabel
passwd teste123ibm4
ctrl d
ctrl d

SSH

  • Permit SSH Root Login (CentOs)
vi /etc/ssh/sshd_config
# Comment PasswordAuthentication no
# Descomment PasswordAuthentication yes
systemctl restart sshd 

Configure Network Interface (CentOs)

vi /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=172.16.1.180
GATEWAY=172.16.1.16
DNS1=172.16.1.112
DNS2=172.16.1.119
systemctl restart network

Package Manager

RPM

sudo rpm -i wget-xxxxxx.rpm

# To see which lib file belongs
rpm -qf /etc/protocols


# To see if some file is missing from lib
sudo rpm --verify setup
sudo rpm -Va # To verify entire machine

YUM

# Config file
cat /etc/yum.conf

# Repos dir
cd /etc/yum.repos.d

sudo yum update

# To download but not install
sudo yum install --downloadonly --downloaddir=/tmp wget

sudo yum remove wget