I lost the root password. So I modified /etc/shadow and also changed '/etc/inittab' file to access single user mode. But both didn't work. It asked me for a password that I don't have. Why updating the two files doesn't work?
I mount the file system, then overwrite the old shadow file with a new shadow file. I'm sure the password hash and format is right. But sometimes I receive error msg like this:
" EXT4-fs error (device vda1): ext4_mb_generate_buddy: EXT4-fs: group 0: 22415 blocks in bitmap, 22416 in gd Login timed out after 180 seconds "
or error msg like this:
" [/sbin/fsck.ext4 (1) -- /] fsck.ext4 -a /dev/vda1 /dev/vda1 contains a file system with errors, check forced. /dev/vda1: Duplicate or bad block in use! /dev/vda1: Multiply-claimed block(s) in inode 131094: 558941 "