To enable root login using PAM (Pluggable Authentication Modules) on Fedora and use Vim editor, you will need to perform the following steps:
- Open Terminal from Applications -> System Tools, or by pressing the CTRL + ALT + T keys
Use the command sudo su to switch to the root user.
Use the command to open the PAM configuration file for the GDM (GNOME Display Manager) password.
Press the i key to enter into insert mode, locate the line that begins with auth required pam_succeed_if.so user != root quiet_success and add the # at the beginning of the line, to comment it out.
# auth required pam_succeed_if.so user != root quiet_success
Press Esc key then type :wq to leave the insert mode and save changes.
Use the command to restart the GDM service.
systemctl restart gdm
You should now be able to log in as the root user using the GDM login screen.
Note: It is not recommended to enable root login on Fedora or any other system, as it is a security risk. Instead, you should use a non-root user and use the sudo command to perform actions that require root privileges.
[How To] Enable Root Login via SSH on Fedora