How To Reset Root Password On CentOS 7

කලින් අපි කතා කරා linux os එකක root password set කරන විදිහ. දැන් අපි බලමු CentOS එකේ password reset කරන විදිහ

  • මුලින්ම  reboot කරන්න.
  • ඊළගට grub menu එකේදී ‘e’ press කරලා edit යන්න.
  • edit ගියාම මේවගේ list එකක් එනවා එකේ ටිකක් පහලට ගියාම Linux 16 කියල තියෙන line එක එනවා  එතන ‘or ‘ වෙනුවට rw init=/sysroot/bin/sh කියල වෙනස් කරන්න.

 

  • දැන්  Ctrl + x ඔබන්න.

 

  • දැන්  single user mode එකෙන් start වෙනවා.
  • දැන් chroot /sysroot කියල type කරලා enter කරන්න.
  • දැන් password එක reset කරන්න passwd root  කියල type කරලා enter කරල ඕනි password එක දන්න.
  • දැන් touch /.autorelabel කියල type කරලා enter කරන්න.
  • දැන් exit වෙලා reboot කරන්න. දැන් password එක reset කරලා ඉවරයි. 🙂
:/# chroot /sysroot
:/# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
:/# touch /.autorelabel
Share This