Tip & How-To about Computers & Internet

How to change the root password in Linux

You need to boot the machine into runlevel 1. This will reboot into a secured shell and allow you to run passwd. This will in turn allow you to set the password for the root account.

To get into runlevel 1, either type telinit 1 in a terminal or command prompt on a Linux machine, or reboot the machine and do the following:

When the splash screen for the OS appears hit F12. This should take you to the grub bootloader. Highlight the entry for the kernel version you are using and press "e". This will allow you to edit this entry. At the end of the line just add the "1" character to it and save the changes and boot into that kernel. The OS should boot directly to a command prompt. At this time you should be the root user. Simply run passwd and enter in a new password, reboot the machine and log in as root using the password you just entered.

Posted by on

Computers & Internet Logo

Related Topics:

Related Questions:

1 Answer

i put a pswd on my acer hard disk. When i go to reboot, it doesnt take the passwd that i just put in. I put in xxxxxx (lower case letters) followed by 123 as the passwd. I did this after hitting f2 and going to security tab. I set the same passwd for supervisor, harddisk, and user. Now I cant even get to boot menu by hitting f2. Just keeps asking me to enter primary master st9120817as Lock

Just a suggestion for the future. Do not use x's for passwords.

Can you get to the BIOS battery? If so you can remove it for a few seconds and it should reset the BIOS so you can get back into it for maintenance.

As for the harddrive. You will either have to reload or get a password recovery tool. There are some free ones on the internet.

Jun 11, 2011 | Acer Aspire One AOA150-1784 Netbook

2 Answers

unlock CURRENT password on acer 250 netbook on ubuntu

Try these steps it worked for me it can work for you:

1. You’ll need to boot from your Ubuntu Live CD, choosing “Try Ubuntu without any change to your computer” from the boot menu.
2. Once the system boots, open up a new Terminal window from Applications \ Accessories and then type in the following command:

sudo fdisk -l (minus small leter L)

3. Now you’ll need to create a directory to mount the hard drive on. Since we’re actually booting off the live cd, the directory doesn’t really get created anywhere. then type

sudo mkdir /media/sda1

4.The next command will mount the hard drive in the /media/sda1 folder.

sudo mount /dev/sda1 /media/sda1

5. The command that actually does the trick is: chroot.
it is used to open up a shell with a different root directory than the current shell is using, and we’ll pass in the folder where we mounted the hard drive.

sudo chroot /media/sda1

6. Now you can be able to use the passwd command to change your user account’s password, and it will be applied to the hard drive since we are using chroot.

7. passwd 12345

Note: you’ll need to type your username after the passwd command in order to change the right password.

8. Now you should be able to reboot your system and log yourself in with your new password.

Sep 11, 2010 | Computers & Internet

2 Answers

Can't log-in in mac os x

I'm assuming that you have forgotten your password, if so, here is what you need to do.
1. With the unit turned off, press the power button to power-on the mac, but also hold down the "CMD" and "C" keys on the keyboard at the same time. This will tell the Mac that you want to boot into SINGLE USER MODE.
2. Mac OS will now boot into a unix command line shell. From here you only need to remember your username and then type in the following command-line statements.
sh /etc/rc passwd USERNAME reboot
In this instance, USERNAME is the username that you normally login as. The "passwd" command will prompt you to enter a new password for the user called USERNAME.
WARNING: Changing your password this way will wipe out any and all keychain passwords associated with your user account. This is a pain, but better than not logging into the box.

May 19, 2010 | Apple Mac OS X 10.4 Tiger for Mac

2 Answers

Describe how to retrieve the asus pc password

Try to remove it with Windows Password Recovery Tool 3.0.
It works perfectly to reset any local user account to a blank password. I Wrote it to an old 128mb USB flash drive do this. Booting up and clearing a password takes a minute or two works like a charm. Source(s): http://search.yahoo.com/search;_ylt=A0oG…

Mar 05, 2010 | ASUS Eee PC 900 PC Notebook

2 Answers


I saw on ebay they had some Brand New Diskless versions and One Used Working one. I know it is not a fix but a lot cheaper than the $1200-$1500 they used to be.


Nov 05, 2007 | Anthology Solutions Yellow Machine P400...

Not finding what you are looking for?

181 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers


Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions