Home
Collections
Build Your Own
Catalog
How To Videos
Quick Reference
View Order Pad

About Us
Contact Us
FAQ
Linux News
Blog


 
 
Acceptance Mark
Amazon Pay





 

The LinuxCollections.com Blog

 

LinuxCollections.com's Blog

Lost or forgot Admin password (root user password)
written March 25, 2020 by Time Traveler
Category: SupportNote Tags: LinuxCollections.com Blog    #18
 

As we have touched on several times already, we are getting support inquiries from people using Linux and trying to find help. For a general coverage of this, see this blog entry

So we received a phone call and asked how to get the Admin password back on Linux. Well, a more accurate term would be the root user or super user password, but losing or forgetting this password is definitely a huge problem. So what are your options?

You will be able to find various options and approaches if you search the internet for solutions to this problem, but (and this is totally dependent on the distro, your security setup, and other configuration options for sudo/sodoers), here is a potentially quick way to fix this.

  • The following assumptions apply and all depend on how your system is configured!
  • You can log in with your user name or some other user
  • That user is configured to use sudo for administrator/super user functions
  • The password, if required, is the password for the user (and not the root password)

Also note that this approach also works for some live distros and will work for any system configured to allow sudo to run as super user for the logged on user.

  • Log on as user with password with sudo privileges
  • Run terminal session (alternate: Ctrl-Alt-F1 or Ctrl-Alt-F2, etc. and log on as user with password)
  • At prompt in terminal, type sudo su[Enter] - if configured, will allow you to run as super user level, if asked for password, use your user's password.
  • If successful (you will be warned if it fails), you will be logged in as root (typically indicated with # prompt)
  • Now type whoami[Enter] - if it shows root, you are almost there!
  • Type passwd[Enter] - Enter your new password, and again to confirm
  • Now type exit[Enter] - this returns to normal user prompt
  • To test, type su[Enter] - and enter your new password - you should be logged on as root (whoami)

For more info on sudo, use man sudo - sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. Note that this must be setup already, and not all distros use this approach (to add created users in the sudoers list). So this process may not work - but it will work on various Linux distros. An interesting aspect of this is that you can change the root password in situations where you really shouldn't - so please be aware that even though you were granted certain privileges, you should not abuse them. You don't need the root password if you can do what you need to do with sudo!!

View Current
View News & Commentary
View Support Items
View All

Blog Information

Lost or forgot Admin password (root user password)
March 25, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

What to expect from a Linux Disc
March 24, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Issues with new Debian 10 install - no Desktop / login prompt only
March 14, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

Solving Problems
January 28, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

US Postage rates go up
January 28, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Need a different operating system
January 25, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Support Stories - Disc Data
January 15, 2020
Time Traveler
Category: SupportNote
Tags: LinuxCollections.com Blog
 

The Facebook Link Conundrum
January 10, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

Welcome to the LinuxCollections.com Blog!
January 6, 2020
Time Traveler
Category: BlogEntry
Tags: LinuxCollections.com Blog
 

 
 

LinuxCollections.com Logo
  • LinuxCollections.com News, Technical information, and other interesting items.
  • LinuxCollections.com is your premier source for Linux distros on CD/DVD/USB.

Send LinuxCollections.com a note via e-mail...