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

How do I fix an ASUS Transformer Book TF101 that's stuck in boot?


  1. Press and hold Power and Vol- until the device reboots and small white text shows up saying press Vol+ within 5seconds for recovery. Do not press Vol+.
  2. It will then prompt you to cold-boot in to either recovery or android, follow the directions on screen to select android and start.
That seems rather annoying to have to do every time you restart the ****** thing. The permanent fix requires either root access via terminal emulator under the installed version of android, or running a remote shell on it with the Android sdk. I chose the latter.
As with all ASDK tomfoolery, start the adb server
adb start-server
Check to make sure the device shows up
adb devices
Start the required remote shell session
adb shell
Run the follow magic command to make everything happy again
echo boot ' dd of=/dev/block/mmcblk0p3 bs=1 seek=0
And then reboot the device.
reboot

May 22, 2017 | ASUS Computers & Internet

1 Answer

what do i do when my emachines laptop loops the title screen


Is it on a boot loop ?
Check to see if there are any keys stuck/depressed. If so, use a paperclip and fit it underneath the key and gently pry the end that is stuck. Make sure the laptop is off before attempting this. Observe where the boot process ends and starts over. In most cases, this will give an indication where the problem occurs. If the laptop reboots early on in the process, for example when it is detecting the hard drive, chances are good it is a hardware issue. If the reboot occurs further along in the process, like when it is loading operating system files, there may be an issue with operating system software. Boot in safe mode or the operating system equivalent. Windows, Unix/Linux and Mac operating system have a mode that will load the minimum software needed to boot. This is a standard approach in troubleshooting, as it only supports the minimum hardware needed to complete the boot into the operating system. Once you are logged into the computer, device drivers can be updated, software removed and so forth. To boot into safe mode in Windows, hit the "F8" key when the computer first starts up to get a submenu. From there select a boot option. Many choose "Safe mode with command prompt" as this will go line by line through the boot process, allowing you to isolate where the problem might be. To boot into a different run level in Unix/Linux, it depends on the version of Unix/Linux, but most have the option of a "recovery mode." During boot hit the "Esc" or "E" key and select the mode appropriate such as "drop to root shell," etc. If you have the ability to get into command shell, enter into run level 1 (single user mode) by typing in "init 1." To start in safe boot on a Macintosh laptop, hold the "Shift" key as it boots up. This forces a disk check and loads minimal software in efforts to complete the boot process, much like the other operating system's "safe modes." Check to see if your laptop is overheating. Laptops have a greater likelihood of overheating than desktops. Either touch the laptop or download an application such as Mobile Meter to check laptop temperature. If it is running hot, try using canned air to clear out of vents, etc. Also, elevating the laptop off of its resting surface allows greater airflow in and out of the laptop

Feb 18, 2013 | Computers & Internet

1 Answer

superstack 3 3848 reset at default


Hi ! I think this solution should be approached. Because this procedure is the same for switches 3Com and HP A-series with Comware OS.

1. Connect light blue console cable between a computer (serial) and the 3COM switch (RJ45 console port)

2. Open PUTTY or Xshell or HyperTerminal with a serial connection and the following settings (19200, 8, 1, N) If not connected may use 9600 or 115200 bps

Starting......

************************************************************************
* *
* 3COM 2928-SFP Plus BOOTROM, Version 119 *
* *
************************************************************************
Creation Date : Feb 3 2010
CPU L1 Cache : 32KB
CPU Clock Speed : 333MHz
Memory Size : 128MB
Flash Size : 128MB
CPLD Version : 002
PCB Version : Ver.B
Mac Address : 002473959EC8


4. When "Press Ctrl-B to enter Extended Boot menu..." appears, press "CTRL+B"

Press Ctrl-B to enter Extended Boot menu...0
Please input BootRom password:

BOOT MENU

5. Press "7" to "Skip current system configuration"

1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify BootRom password
6. Enter BootRom upgrade menu
7. Skip current system configuration
8. Set BootRom password recovery
9. Set switch startup mode
0. Reboot

Enter your choice(0-9): 7



7. Press "Y" to skip the current config at next reboot


The current setting will run with current configuration file when reboot.
Are you sure you want to skip current configuration file when reboot? Yes or
No (Y/N):Y
Setting...Done!


8. Now Press "0" to reboot the switch


BOOT MENU

1. Download application file to flash
2. Select application file to boot
3. Display all files in flash
4. Delete file from flash
5. Modify BootRom password
6. Enter BootRom upgrade menu
7. Skip current system configuration
8. Set BootRom password recovery
9. Set switch startup mode
0. Reboot

Enter your choice(0-9): 0



9. The switch will reboot, allow it to fully boot this time


Starting......

************************************************************************
* *
* 3COM 2928-SFP Plus BOOTROM, Version 119 *
* *
************************************************************************
Creation Date : Feb 3 2010
CPU L1 Cache : 32KB
CPU Clock Speed : 333MHz
Memory Size : 128MB
Flash Size : 128MB
CPLD Version : 002
PCB Version : Ver.B
Mac Address : 002473959EC8


Press Ctrl-B to enter Extended Boot menu...0
Starting to get the main application file--flash:/S2900-CMW520-R1101P09.bin!...
..........................................................................
The main application file is self-decompressing................................
...............................................................................
.........................Done!
System is starting...
Configuration file is skipped.
User interface aux0 is available.

10. Press "Enter", you will not need a password to login.

Press ENTER to get started.
<3Com Baseline Switch>
#Apr 26 12:00:16:292 2000 3Com Baseline Switch SHELL/4/LOGIN:
Trap 1.3.6.1.4.1.43.45.1.10.2.2.1.1.3.0.1<h3cLogIn>: login from Console VMadmin.co.uk
%Apr 26 12:00:16:461 2000 3Com Baseline Switch SHELL/4/LOGIN: Console login from aux0
<3Com Baseline Switch>

11. Now type "initialize" to delete the configuration file and reboot the switch once more, Press "Y" to accept reboot.

<3Com Baseline Switch>initialize
The startup configuration file will be deleted and the system will be rebooted. Continue? [Y/N]:Y
Please wait...
#Apr 26 12:00:33:537 2000 3Com Baseline Switch DEV/1/REBOOT:
Reboot device by command.

%Apr 26 12:00:33:641 2000 3Com Baseline Switch DEV/4/SYSTEM REBOOT:
System is rebooting now.

12. The switch will full start up again, this time completely factory reset.

Starting......

************************************************************************
* *
* 3COM 2928-SFP Plus BOOTROM, Version 119 *
* *
************************************************************************
Creation Date : Feb 3 2010
CPU L1 Cache : 32KB
CPU Clock Speed : 333MHz
Memory Size : 128MB
Flash Size : 128MB
CPLD Version : 002
PCB Version : Ver.B
Mac Address : 002473959EC8


Press Ctrl-B to enter Extended Boot menu...0
Starting to get the main application file--flash:/S2900-CMW520-R1101P09.bin!...
..........................................................................
The main application file is self-decompressing................................
...............................................................................
.........................Done!
System is starting...
Startup configuration file does not exist.
User interface aux0 is available.

13. Press "Enter", then enter the username "admin" and password "<blank>". Press "Enter" and you will be logged in.

Press ENTER to get started.

Login authentication


Username:admin
Password:
<3Com Baseline Switch>
#Apr 26 12:00:19:811 2000 this article is from VMadmin.co.uk 3Com Baseline Switch SHELL/4/LOGIN:
Trap 1.3.6.1.4.1.43.45.1.10.2.2.1.1.3.0.1<h3cLogIn>:admin login from Console
%Apr 26 12:00:19:981 2000 3Com Baseline Switch SHELL/4/LOGIN: admin login from aux0
<3Com Baseline Switch>
<3Com Baseline Switch>

14. If you type "summary" you will see all the switch details.

Amongst these details are the IP address of the switch. If you have DHCP on your network this switch is connected to it will receive one as in my case below, so I can now configure the rest via a web browser.

If not you can use the "ipsetup" command to set a static management IP and access via a web browser.


<3Com Baseline Switch>summary
Select menu option: Summary
IP Method: DHCP
IP address: 192.168.1.250
Subnet mask: 255.255.255.0
Default gateway: 192.168.1.254

Current boot app is: flash:/S2900-CMW520-R1101P09.bin
Next main boot app is: flash:/s2900-cmw520-r1101p09.bin
Next backup boot app is: NULL

3Com Corporation
3Com Baseline Switch 2928-SFP Plus Software Version 5.20 Release 1101P09
Copyright (c) 2004-2010 3Com Corp. and its licensors. All rights reserved.
3Com Baseline Switch 2928-SFP Plus uptime is 0 week, 0 day, 0 hour, 1 minute

3Com Baseline Switch 2928-SFP Plus
128M bytes DRAM
128M bytes Nand Flash Memory
Config Register points to Nand Flash

Hardware Version is REV.B
CPLD Version is 002
Bootrom Version is 119
[SubSlot 0] 24GE+4SFP Hardware Version is REV.B

<3Com Baseline Switch>



15. Once you can access the web management page for the switch make sure you set a strong password for "admin" and store it in a secure encrypted location for next time.

16. Don't forget to save your new configuration! Otherwise the switch will be at factory defaults if the power goes off!!

Jul 24, 2017 | 3Com SuperStack 3 3848 48-Port Gigabit...

2 Answers

Sony f series missing BOOTMGR


Bootmgr is missing - Vista, Windows 7
Go to this WEB site for instructions to fix this problem
http://pcsupport.about.com/od/findbyerrormessage/a/bootmgr-is-missing.htm

Jul 21, 2012 | Acer Aspire Computers & Internet

1 Answer

password recorvery for an Avocent Cyclades ACS 6016 switch


To recover the ACS 6000 console server root password:

1. Connect directly to the console server's CONSOLE port.

2. Turn the console server off, then on again.

3. Press the Spacebar to access the uboot prompt.

4. Type hw_boot single and press Enter.

5. The console server will boot into single-user mode. Type passwd and press Enter.

6. Enter the new password and confirm.
7. Type reboot and let the console server boot normally

Jan 19, 2011 | Computers & Internet

Not finding what you are looking for?

195 people viewed this tip

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18424 Answers

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

David Payne
David Payne

Level 3 Expert

14162 Answers

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

Answer questions

Loading...