Ask Your Question
2

Recovering admin password [closed]

asked 2016-12-05 00:02:13 -0500

Noobius gravatar image

I have forgotten my administrator account password. Is there any way I can recover or change it?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Noobius
close date 2016-12-25 02:33:34.318356

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-12-05 11:49:10 -0500

fcomida gravatar image

Boot into "single user mode". Append single at the end of grub command line. Hit e at grub boot screen to edit it. Then at the root prompt type passwd to change your password.

edit flag offensive delete link more
0

answered 2016-12-05 14:04:46 -0500

becks21 gravatar image

Using grub:

  1. select the appropriate boot entry, then press 'e'
  2. look for the line that starts with "linux" or "linux16" (for uefi: "linuxefi")
  3. place the cursor at the end of that line, append "<space>rw<space>init=/bin/bash" (without quotes)
  4. hit Ctrl-x and the system will boot with root to bash
  5. enter "passwd", enter new password (twice)
  6. to make selinux happy: enter "touch /.autorelabel"
  7. reboot: "/sbin/reboot -f"

Remember: with great power comes great responsibility.

Source: https://fedoraproject.org/wiki/How_to_reset_a_root_password

edit flag offensive delete link more

Comments

This is the correct method to recover a lost root password with systemd. This assumes that grub is not locked.

astrognome gravatar imageastrognome ( 2016-12-05 21:38:55 -0500 )edit

what do you mean with ".. grub is not locked" ?

becks21 gravatar imagebecks21 ( 2016-12-06 15:45:25 -0500 )edit

Question Tools

Stats

Asked: 2016-12-05 00:02:13 -0500

Seen: 2,776 times

Last updated: Dec 05 '16