You are on page 1of 7

How to Reset Password in Linux | Step-by-step Guide https://gcore.

com/learning/how-to-reset-password-in-linux/

GPU Al/ML today! NVIDIA A100s & H100s for € 2.06/h


Tools

• Looking Glass
• Speed Test
• Developer Tools
• Status Page

Content Hub

• Blog
• Learning
• News
• Case studies
• Downloads
• Press & Media
• Product Roadmap
• Product Documentation
• API Documentation
• Help Center

Under attack?
Talk to an expert
en

• en
• de

en

• en
• de

• Products

Products
AI & Machine Learning
AI & Machine Learning

AI IPU CloudInfrastructure of servers designed to accelerate machine learning

AI UniversitiesAI for Universities and Research teams

AI GPU CloudBare metal servers and virtual machines with NVIDIA A100 and H100 GPUs

AI Image GeneratorCreate realistic and stunning images from text descriptions in seconds with Gcore’s AI-powered tool

Speech-To-Text TranslationAI cloud and ML powered speech-to-text translation tool to translate English to Luxembourgish
Edge Network
Edge Network

CDNNext-gen CDN for dynamic and static content delivery

Managed DNSAuthoritative DNS for mission-critical availability

FastEdgeLow-latency edge computing for serverless app deployment

Public DNSFast, secure, and free DNS resolver that protects your privacy.

Network MapReliable global infrastructure for utmost service availability

Edge NetworkAll-in-one edge platform for better application delivery


Infrastructure as a Service
Infrastructure as a Service

Cloud Edge ServicesVirtual data center with built-in platform services

Virtual InstancesVirtual machines with pay-as-you-go billing and customizable configurations

Basic VMShared virtual machines starting from 3.7 euro

Bare MetalSingle-tenant powerful physical servers for any business need

Private CloudCloud networks with unlimited intra-network traffic

Intel SGXInstances with Intel Software Guard Extensions designed to build secure enclave-based applications.

Cloud StorageS3/SFTP Storage for storing your data on our servers in Europe, the USA, and Asia.

Load BalancerTraffic distribution tool for increasing reliability and capacity of applications

Data MigrationMoving to our cloud without interruptions in the activity and zero data loss

1 of 7 2/16/24, 16:01
How to Reset Password in Linux | Step-by-step Guide https://gcore.com/learning/how-to-reset-password-in-linux/

Disaster RecoveryProtection of your business IT infrastructure from downtime in the event of failures and crashes

Cloud File SharesCreate, access, and share files remotely in the cloud

Application MarketplaceOnline marketplace with ready-to-use applications

Veeam BackupVeeam Backup and recovery solutions to protect your business critical data and ensure business continuity

PricingChoose the billing plan that suits your business needs


Platform as a Service
Platform as a Service

Managed KubernetesFully managed Kubernetes solution with no additional cost and rapid deployment

Function as a ServiceServerless computing service for running code in a ready-made environment

Managed LoggingCollection of logs from all your servers in one repository

Managed DatabaseProvision fully managed PostgreSQL databases effortlessly


Virtual & Dedicated Servers
Virtual & Dedicated Servers

HostingVirtual and Dedicated servers in certified data centers around the world

Virtual ServerVirtual servers with no traffic restrictions

Dedicated ServersPhysical servers in data centers on 4 continents

SSL CertificatesDV, OV, IDN, and Wildcard SSL certificates

Additional Hosting OptionIPs, VLAN, BGP, LACP

Internet OptionsInternet connectivity plans

GPU Dedicated ServersPhysical servers with powerful graphics cards


Video Streaming Platform
Video Streaming Platform

Streaming PlatformInfrastructure for streaming video in your apps to 100M+ viewers and beyond

Video HostingMedia Platform by Gcore delivers video in 4K resolution to any device your viewers have

Live-streamingLow latency streaming to 1,000,000+ viewers.

Real Time VideoModule for video calls and conferencing inside your web, iOS, and Android app

Computer VisionModule for objects recognition and video analysis based on machine learning

FeaturesTools you need to build & scale video streaming in seconds

PricingStreaming Platform plans and cost estimation calculator for your case

Demo & ExamplesWatch live demo examples of our features and integrations
Security
Security

DDoS ProtectionReliable infrastructure protection against DDoS attacks

Web Application SecurityWeb security mechanisms for stable application operation

Secure Cloud ComputingGcore Secure Cloud Computing services help accelerate resilience in the public cloud by offering access to cloud security experts and strategies.

WAAPPowerfull all-in-one WAAP (Web Application and API Protection) solution against full spectrum of threats

Penetration TestIT infrastructure and web applications trial for penetration

Under Attack?If your website, server, or API is under attack — we are ready to help
Cloud for Mobile
Cloud for Mobile

5G eSIM platformCloud computing powered by 5G eSIM technology


Custom Services
Custom Services

IT Infrastructure ManagementServices that cover all the IT needs — from architecture planning to the operation of ready-made solutions

Penetration TestIT infrastructure and web applications trial for penetration

White Label ProgramWhite-label edge and cloud services ready-to-rock with your logo and branding

Premium SupportExperienced and friendly technical support specialists to assist in connecting, integrating, configuring and maintaining.

Software DevelopmentFull-cycle development without the need to hire programmers


• Solutions

Solutions
By Industry
Gaming
◦ CDN for Gaming
◦ Game Server Protection
◦ Game Development
Media & Entertainment
◦ CDN for Video
◦ Video Hosting
◦ Live Streaming
◦ Video Calls
◦ Metaverse Streaming
◦ TV & Online Broadcasters
◦ Sport Broadcasting
◦ Online events
Financial Services

2 of 7 2/16/24, 16:01
How to Reset Password in Linux | Step-by-step Guide https://gcore.com/learning/how-to-reset-password-in-linux/

◦ Cloud for financial services


IT / Technology
◦ Image Optimization
◦ Website Acceleration
◦ WordPress CDN
◦ White Label Program
Retail
◦ CDN for E-commerce
Education
◦ AI Universities
◦ Online Education
By Need
Web Acceleration
◦ Website Acceleration
◦ Image Optimization
◦ Wordpress CDN
Video Streaming
◦ CDN for Video
◦ Video Hosting
◦ Live Streaming
◦ Video Calls
Security & Protection
◦ DDoS Protection
◦ Game Server Protection
◦ Penetration Test
Cloud
◦ Web Service
◦ Game Development
Availability
◦ MultiCDN
By Service
Partnership Solutions
◦ White Label Products
◦ Affiliate Program
◦ Referral Program
Corporate Solutions
◦ Data Migration
◦ Disaster Recovery
• Pricing
• Partnership
Latest case studies
You’re in good company
Revolutionizing Online Education in India: The Success Story of FliQi and Gcore Collaboration
Online education has become a cornerstone for knowledge acquisition in the fast-paced, digital-first era. However, ensuring seamless content delivery and...
July 26, 2023
How Sandbox Interactive Uses Gcore’s Cloud for Expanding Albion Online in Asia-Pacific Region
Sandbox Interactive is a Berlin-based game development studio that specializes in creating massively multiplayer online role-playing games (MMORPGs). One of...
July 18, 2023
All case studies

Partnership
White Label Program
Partners
Partners
Intel
Intel New CPU Generation
Intel Ice Lakes
HESP
Equinix
Graphcore
InData Labs
Ampere
Unum
Referral Program
Review Reward
Affiliate Program
Infrastructure for Startups
Bug Bounty Policy
• Company
Latest articles
Here you can find useful tips, features and solutions
NVIDIA GPUs: H100 vs. A100 | A Detailed Comparison
In 2022, NVIDIA released the H100, marking a significant addition to their GPU lineup. Designed to both complement and compete...
February 5, 2024
Running Kubeflow on Gcore Managed Kubernetes
In this tutorial, we’ll explore how to install and run Kubeflow on Gcore Managed Kubernetes. Kubeflow is an open-source toolkit...
January 26, 2024
All articles

Company
About Gcore
Compliance
Press & Media
Legal Information
Careers
Internet Peering Points
Events
Infrastructure
• Content Hub

Content Hub
Blog
Learning
News
Case studies
Downloads
Press & Media
API Documentation
Product Roadmap
Product Documentation
Help Center
• Tools

Tools
Looking Glass
Speed Test
Developer Tools
Status Page
• Talk to an expert
• Under attack?

3 of 7 2/16/24, 16:01
How to Reset Password in Linux | Step-by-step Guide https://gcore.com/learning/how-to-reset-password-in-linux/

Sign in Get started for free

Select the Gcore Platform


Recommended

Gcore Edge Solutions Go to Gcore Platform →

Products:

• Edge Delivery (CDN)


• DNS with failover
• Virtual Machines
• Bare Metal
• Cloud Load Balancers
• Managed Kubernetes
• AI Infrastructure
• Edge Security (DDOS+WAF)
• FaaS
• Streaming
• Object Storage
• ImageStack (Optimize and Resize)
• Edge Compute (Coming soon)

Show full list

Gcore Hosting Go to Gcore Hosting →

Products:

• VPS Hosting
• Dedicated Servers

News
Blog
Learning
Press
Case Studies
Downloads
Events

1. Home
2. Learning
3. How to Reset Password in Linux

How to Reset Password in Linux


Published August 30, 2023

In this article

• Resetting Linux Password using GRUB


• Resetting Linux Password Using Live CD/USB
• Conclusion

4 of 7 2/16/24, 16:01
How to Reset Password in Linux | Step-by-step Guide https://gcore.com/learning/how-to-reset-password-in-linux/

Forgetting a password can be a minor hiccup for most, but when it comes to Linux—a system known for its robust security features—it can feel like a daunting obstacle. Whether you’re new to the
world of open-source operating systems or a seasoned Linux veteran, resetting your password doesn’t have to be a complex chore. This guide offers a concise, step-by-step approach to help you
swiftly regain access to your Linux machine.

Resetting Linux Password using GRUB


Resetting a Linux password using the GRUB bootloader involves booting into single-user mode or recovery mode and then using the command line to reset the password. Here’s a step-by-step
guide:

1. Access the GRUB menu. GRUB (Grand Unified Bootloader) is the default bootloader for most Linux distributions. First, restart or power on your computer. As soon as the boot process begins,
press and hold the Shift key (for some systems it might be the Esc key) to bring up the GRUB menu.

2. Enter the Edit Mode. Before booting into the system, you need to edit the boot parameters. First, highlight the default boot entry (usually the first in the list) using arrow keys.

• Press ‘E’ to edit the entry.

3. Modify Boot Parameters. To boot into single-user mode, you need to modify the Linux boot parameters. Here are the following steps:

• Find the line that starts with linux or linux16. This line specifies the boot parameters.
• At this line, locate ‘ro quiet’, replace ‘ro’ to ‘rw’ then add the word single or init=/bin/bash, depending on your distribution and setup.
• Press Ctrl + X or F10 to boot with the modified parameters.

Here’s an example:

4. Remount the File System with Write Permissions. By default, the filesystem might be in read-only mode in this state. To change the password, you’ll need write permissions. Enter the
following command:

mount -n -o remount,rw /

5. Reset the Password. Use the passwd command to reset the password for a user. Enter the command below, replacing ‘username’ with the actual username for which you want to reset the
password:

passwd username

When prompted, enter the new password twice.

6. Reboot the System. Now that the password is reset, it’s best to reboot the system to return to normal operation. Enter the following command:

sync

Then, force a reboot with:

reboot -f

The new password should now be active, and you can test it. In the following section, we’ll explore an alternative method using a live CD or USB.

Resetting Linux Password Using Live CD/USB


Resetting a Linux password using a Live CD or USB is a useful method when you’ve forgotten the root or user password. Here are the step-by-step instructions:

1. Boot from the Live CD/USB. Insert your Live CD or USB stick. Reboot the computer and choose to boot from the CD/USB from the BIOS or UEFI boot menu.

2. Open a Terminal. Once the live environment is loaded, locate and open a terminal window.

3. Identify the System’s Root Partition. You can use tools like fdisk or lsblk to identify your system’s root partition.

sudo fdisk -l
# or
sudo lsblk -f

Look for partitions that are likely Linux root partitions, such as ext4, xfs, etc.

4. Mount the Root Partition. Create a mount point by running this command:

sudo mkdir /mnt/myroot

Mount the identified root partition (replace /dev/sdXY with your partition, for example, /dev/sda1):

sudo mount /dev/sdXY /mnt/myroot

5. Change Root into the System. Use chroot to change the root directory by using this command:

sudo chroot /mnt/myroot

6. Reset the Password. Now that you’ve chrooted into your system, you can use the passwd command to change the password for any user, including root.

passwd username

Replace “username” with the actual username or use root to reset the root password.

5 of 7 2/16/24, 16:01
How to Reset Password in Linux | Step-by-step Guide https://gcore.com/learning/how-to-reset-password-in-linux/

7. Exit and Unmount. Exit the chroot environment and unmount the partition.

exit
sudo umount /mnt/myroot

8. Reboot. Remove the Live CD/USB and reboot your computer. Now, you should now be able to log in using the new password.

That’s it! You’re now able to reset passwords in Linux. To reset passwords, you can use either the GRUB method or a Live CD. The GRUB method is fast and doesn’t need external tools, but a Live
CD is more universal and works well for complex system setups or restricted GRUB access.

Conclusion
Looking to deploy Linux in the cloud? With Gcore Cloud, you can choose from Basic VM, Virtual Instances, or VPS/VDS suitable for Linux:

• Gcore Basic VM offers shared virtual machines from €3.2 per month
• Virtual Instances are virtual machines with a variety of configurations and an application marketplace
• Virtual Dedicated Servers provide outstanding speed of 200+ Mbps in 20+ global locations

Choose an instance

Related product

Try Gcore Edge & Cloud Platform

• AI Cloud Infrastructure
• Cloud Computing
• Platform as a Service
• 5G eSIM Platform
• Edge Network
• Video Streaming
• Security
• Hosting

Get started Explore

Related articles

• How to Use the ffsend Command-Line Utility


• Running V2Ray VPN Service via WebSocket and Gcore Services
• What Is DNSSEC and Why Is It Important for Businesses?

Share



Subscribe and discover the newest


updates, news, and features
We value your inbox and are committed to preventing spam
Email*

Submit

We provide powerful solutions that will help your business grow globally. Try our superior performance for free.

Convenient cloud services with low latency around the world proven by the largest online businesses.

Products

• CDN
• DNS
• Hosting
• Streaming Platform
• Storage
• DDoS Protection
• Cloud
• IT Infrastructure Management

Company

• About
• Affiliate Program
• Referral Program
• Case Studies
• Careers
• Blog
• Learning
• Press
• Legal Information
• #SupportUkraine

Resources

• Status Page
• API Documentation
• Product Documentation
• Looking Glass
• Developer Tools
• Products Roadmap

6 of 7 2/16/24, 16:01
How to Reset Password in Linux | Step-by-step Guide https://gcore.com/learning/how-to-reset-password-in-linux/

• Help Center

Contact

• support@gcore.com
• info@gcore.com
• Report abuse

Sales

• + 352 208 80 507


• sales@gcore.com

Follow us on social media

Subscribe and discover the newest updates, news, and features

We value your inbox and are committed to preventing spam

Email*

Submit

By clicking the button you give us an informed, specific and unambiguous consent to process your personal data in accordance with our Privacy policy

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

G-Core Labs S.A. © 2015–2024 All rights reserved. Principal place of business and postal address: 2-4, Rue Edmond Reuter, L-5326 Contern, Luxembourg

7 of 7 2/16/24, 16:01

You might also like