System unable to boot to login screen

General support questions
Post Reply
Janya
Posts: 2
Joined: 2019/09/21 16:34:13

System unable to boot to login screen

Post by Janya » 2019/09/22 06:24:04

I am using centos 7 (3.10.0-514.6.2) and have mistakenly given wrong permission to /usr/bin by typing chmod -R 666 /usr/bin.
After that no command was working and rebooting the system got stuck at started update UTMP about system run level change
Neither rescue or emergency mode is working.

Using installation CD I was able to again set permission 755 to /usr/bin, but still system gets stuck at UTMP run level change every time.

So can someone suggest how to solve this issue.

User avatar
TrevorH
Forum Moderator
Posts: 26525
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: System unable to boot to login screen

Post by TrevorH » 2019/09/22 11:32:56

Boot the installation DVD in rescue mode and tell it to mount your system partitions when it asks. Once booted up, chroot into the system using

chroot /mnt/sysimage
then run

for p in $(rpm -qa); do rpm --setugids $p; rpm --setperms $p; done

Since you are so far backlevel, that will hit a bug in rpm that removes the capabilities flags from some executables so you then need to run rpm -Va and look for messages about missing capabilities (a P in the flags at the start of each output line). For those files, you need to run rpm -qf $thatfile and work out what package it belongs to from that and then yum reinstall that package from scratch.

And 7.3 is nearly 3 years out of date. You need to be running yum update much more regularly than every 3 years. High severity patches come out all the time and to keep your system secure you should be updating it. 7.3 has numerous high severity vulnerabilities present that are fixed in later releases. Update.
CentOS 5 died in March 2017 - migrate NOW!
CentOS 6 goes EOL sooner rather than later, get upgrading!
Full time Geek, part time moderator. Use the FAQ Luke

Janya
Posts: 2
Joined: 2019/09/21 16:34:13

Re: System unable to boot to login screen

Post by Janya » 2019/09/22 13:34:56

chroot /mnt/sysimage command gives permission denied..

But every command i fire works as root
I couldn't understand this behaviour also.

Post Reply

Return to “CentOS 7 - General Support”