By Kevin Williams

Reset the root Password

  1. Change the default user to root via command line
# Ubuntu (20.04)
ubuntu2004 config --default-user root

# Debian
debian config --default-user root

# Kali
kali config --default-user root

2. Set the regular user's password

# If you forget the username
ls /home

passwd <USERNAME>

3. Reset the default user via command line

# Ubuntu (20.04)
ubuntu2004 config --default-user <USERNAME>

# Debian
debian config --default-user <USERNAME>

# Kali
kali config --default-user <USERNAME>

Kevin Williams • 44 Articles

A full stack software engineer since 2018, specializing in Azure and .Net.

View Articles