Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

How can we change Linux server password with out log in in linux server?

user-image
Question ajoutée par Ezat Said , Entrey IT , NHLP
Date de publication: 2014/07/09

The best way is to boot linux in run level-1 and reset the password. 

 

Second option is to use third party software to boot your linux machine with DVD/CD and then select appropriate option to reset password. 

 

My vote goes for option no.1 , since it a recommended one. 

 

You can log in using single-user mode and create a new root password.

 

To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following:

 

1. At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.

2. You are presented with a prompt that looks similar to the following:

grub append> ro root=LABEL=/

3. Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:

ro root=LABEL=/ single

4. Press [Enter] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

sh-2.05b#

5. You can now change the root password by typing

passwd root

You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.

Rajesh Pant
par Rajesh Pant , System Engineer , Tech Mahindra Limited

This can't be made (Without login to server modify user/s credentials)

you can go through below for well known methods by login / access server

1.) ssh (Super user privileges required to perform special tasks)

2.) Single user mode

3.) Rescue mode

 

 

Davide Raro
par Davide Raro , Project Manager , COROBOR Systèmes, a Campbell Scientific Company

You can easily do it editing the grub config in order to boot up the system in runlevel1 (single user mode).

Be careful because, normally, System Admins must protect the grub with password, in that case if you don't know the password you can't do it.

othman aljundi
par othman aljundi , Senior Systems Administrator (UNIX and Linux) , Orange - Jordan; Jordan Telecom

What do you mean without loging in ?

you can use scipts and redirect input for the password prompt and run it through ssh from another server .

 

 

 

Waqas Ali
par Waqas Ali , Principal Network Engineer , TRG (The Resource Group)

STEP1. Boot Computer and Interrupt while booting at GRUB stage hitting ‘arrow‘ keys or “space bar“.

STEP2. Type ‘a‘ to modify kernel argument. Anytime you can cancel typing ‘ESC‘ key.

STEP3. Append 1 at the end of “rhgb quiet” and press “Enter” key to boot into single user mode.

STEP4. Type command “runlevel” to know the the runlevel where you are standing. Here “1 S” state that your are in a single user mode.

STEP5. Type ‘passwd‘ command without username and press ‘Enter‘ key in command prompt. It’ll ask to supply new root password and re-type the same password for confirmation.

 

More Questions Like This

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?