Linux

how do i change the root password in Linux?
deklinmAsked:
Who is Participating?
 
farzanjCommented:
If you are root, just say

passwd

If you are not root, you can issue command
passwd root

as pilson66 said.
0
 
pilson66Commented:
enter "passwd root"
0
 
omarfaridCommented:
as root user run

passwd

you will not be prompted for old password

but if you are some other user then use

passwd root

and you will be prompted for old root password
0
 
Duncan RoeSoftware DeveloperCommented:
Do you still have the old root password? The above answers only work if you do. Otherwise you have to reboot with init=/bin/bash appended to the boot command line. That gives you a root shell prompt and then you change the password as in http:#a37309842 above.
The procedure for appending to the boot line is explained here
0
 
underskyCommented:
if you under ubuntu, you have sudo to use root permissions, do not actualy need root password, and root login, (for security), u can use
sudo -sH
sudo su


to run as root,

also sudo *command* run it as root, but without root enviroment, it's not actualy need, only if you install Oracle/or something, that use u'r system enviroment


but if you still need root pass/ or forget old

type:
passwd root
sudo passwd

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.