How Can I Gain Sudo Access on Fedora Without a Root Password?

0
8
Asked By CuriousGadget42 On

I'm trying to install CKAN, a mod manager for Kerbal Space Program, but I need to use the sudo command in the terminal. The issue is that I'm locked out of the root user account since it requires a password that I never set. When I boot into GRUB, I end up in emergency mode, making it impossible to access sudo or the root account. I'm using Fedora, specifically Nobara 43. Any help or suggestions would be greatly appreciated! Also, just to clarify, I don't have a password for any of the accounts on this PC.

5 Answers

Answered By RootExpert456 On

Technically, if you have root access, you can edit the sudoers file directly, but that might not be the best approach for your situation. Just be cautious with what you change in there.

Answered By SystemGuru123 On

If this is your own PC, you may want to consider reinstalling the OS. It's important to have sudo access since you'll likely need it often. If you're using someone else's machine, you'll have to ask them for help because they might have a good reason for not granting you sudo access.

Answered By LinuxLover99 On

Just to clarify, when you run 'sudo', it asks for your user password, not the root password. The 'su' command is what asks for the root password.

Answered By TechSavvyNinja On

You could boot from a USB and set a new root password that way. This method is pretty effective and gives you a hands-on way to learn how your distro works. Good luck!

CuriousGadget42 -

Thanks for the tip! I ended up doing just that from a live session. I set the password and installed sudo as well. Really appreciate your help!

Answered By DebianDynamo On

Isn't it worth noting that 'sudo' is typically pre-installed on most Linux distributions? However, users need to be added to the sudoers group to use it effectively, which can happen during installation or may require manual setup afterwards.

LinuxLover99 -

You're correct! 'Sudo' might come with the system, but you need to be properly configured to use it. Some distros set it up automatically for the default user, like Ubuntu, while others leave it up to the user.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.