Archive for the ‘Linux Passwords’ Category

I forgot the root password on my linux machine

May 12, 2008

Linux basic commands FAQ

Simple tasks for simple minds :)

The “forgotten root password”

Q. I forgot the root password on my linux machine. How do I change the password ?

R. The easiest way to change the “forgotten root password” is to boot your Linux machine in the single-user mode, namely at the “lilo”prompt, during the bootup you will type:

linux single

This will log you in as “root” without asking for a password. As root, you may now change the root password using passwd command ( the old password is not required ):

passwd

If this seems to you insecure or to simple to be true, that is because no computer system is realy secure if other people have physical access to the computer hardware.

There is a way to secure the lilo boot, but this will be the subject for another article.

Linux change root password

May 12, 2008

Linux basic commads FAQ:

Simple task for simple minds :)

Q. How do I change the root password on a linux ( unix ) operating system ?
 
R. What you need to do in order to change the root account password on a linux or unix machine is:
 
- open a terminal an login as root ( if the system permits loging in as root )
or
- open a terminal, login with your account and type “su” to become root.
Enter the ( old ) root password to login
then type “passwd” and it will prompt you for a new password.
—————————-
 
root@ibm:/# passwd
 
Changing password for root
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
 
New password: **********
Re-enter new password: **********

Password changed.
 
————————–

 

This should be all.
P.S. The password should be rather complex, containing numbers and letters. However try to pic one that you will remember easily, but not known by everybody.