Fedora sugestion:
While booting the system the GRUB2 menu will be displayed, to boot the system using bash follow these steps:
- Use the arrow keys to select the boot entry you want to edit
- Press e to start editing that entry
- Use the arrow keys to go to the line that starts with linux or linux16
- If you have a UEFI system it's the line that starts with linuxefi
- Go the the end of that line add a space then rw then another space and init=/bin/bash
- If your disk is encrypted, you may need to add plymouth.enable=0 as well
- Press Ctrl-x or F10 to boot that entry
# adduser [name]
# visudo
# User privilege specification
root ALL=(ALL:ALL) ALL
newuser ALL=(ALL:ALL) ALL
# /sbin/reboot -f
After all, clean your tracks.
sudo deluser --remove-home username