To list all files in current directory including dot files (hidden files or directories), as well as print permissions :
ls -laReset root password linux
-
To reset the root password on centos or almost any linux machine
, boot - or reboot the machine
While the machine is booting, Interrupt grub by tapping a key ( spacebar ect ) which will bring you to to the installation options screen, making sure if you have more than one install or kernel , you are highlighting the proper one ( not sure ? Leave as it is )
Press “a” , this will put you in ‘append’ mode so that you can edit the boot command.
You should see a promt something such as "
grub append> ro root=label=/
Or similar, depending on your pre set boot options and specific installation.
All you need to do at this point is type one space, then the word :
single
This will start the operating system in single user mode, and drop you in a shell.
At the command prompt you will see :
sh-2#
or something very similar
To change the root password type:
passwd root
you will be asked to type in the new password - and to re- type the new password.
Your done! All you need to do is type:
reboot
And your golden !
-