Login Incorrect soon after username root (No password prompt)

arunmal

New Member
Joined
Jun 26, 2024
Messages
3
Reaction score
0
Credits
31
Out Redhat Enterprise based PABX completely out of service.
Even the IPs are wiped out. No web interface.
When type root to login through the console, Login Incorrect displays without prompt to type the password.
I have attached the photo.
I have basic knowledge of Linux but not deep.
Can someone help me to resolve this issue?
 

Attachments

  • sbc-console-error.png
    sbc-console-error.png
    1.2 MB · Views: 40


Do you have physical access to the machine / is it a VM / cloud server?

In this case you should boot a rescue system, as in boot it from a usb stick or in VM / cloud-server attach another disk with another rhel linux.
Then mount the old disk and chroot into it - works like this:

Code:
mount /dev/sda1 /mnt/sysimage
mount -o bind /proc /mnt/sysimage/proc
mount -o bind /sys /mnt/sysimage/sys
mount -o bind /dev /mnt/sysimage/dev
chroot /mnt/sysimage

then change the password and exit

Code:
passwd
exit

Reboot using the original disk and it should be set.

Keep in mind that passwords don't just randomly change. You should investigate why this happened. If its a physical server you should check if the disks are failing using the smartctl tool. Also ask around if anyone in your company changed it. If thats not the case, study the logs (i hope you have a central log server so they can't be modified by an attacker) to see if somebody changed it.
 
Thanks for the guidance.
Actually the issue is that I don't get opportunity to enter the password.
Soon after I typed root and pressed enter, Login incorrect message appears.
By reading other post I think issue is related to /etc/pam.d/system-auth
But I don't know how to access those files and commands.
 
Soon after I typed root and pressed enter, Login incorrect message appears.

you mean BEFORE you get a chance to enter the password? On most linux distros you can try to login with a user that doesnt exist, as in it will ask for the password first, but not 100% sure about rhel.

If the root user doesnt exist and it did before its bascially the same game - run rescue system, mount, chroot and re-create root user.

But I don't know how to access those files and commands.

This is what you need the chroot for. Do you understand what I wrote above, as in are you technically able to follow those commands / steps to boot a rescue system / mount / chroot?

Is it a physical server or a cloud server?
 
Yes, you got it right. It's a physical server.

This is exactly what's happening in the console.

SBC01 login: root
Login incorrect
SBC01 login:

We don't get the space to type the password.

Our Red hat OS is
Red Hat Enterprise Linux Server (3.10.0-1062.26.1.e17.V1.X86_64) 7.7 (

So I will do the following steps and update here. Correct me if I am wrong. (I am working remotely so it's time consuming)


Create a rescue USB Pen for version 7.7
Boot and then

mount /dev/sda1 /mnt/sysimage
mount -o bind /proc /mnt/sysimage/proc
mount -o bind /sys /mnt/sysimage/sys
mount -o bind /dev /mnt/sysimage/dev
chroot /mnt/sysimage

adduser root2
passwd
usermod -aG wheel root2
 
It looks to me like you're trying to get in in such a way that the system won't allow. A root login is only permitted when the access device is listed in /etc/securetty. You may be having an issue with sshd or pam as well. Try to log in as someone else that has sudo access and then use that to get a root shell.

Signed,

Matthew Campbell
 

Members online


Latest posts

Top