How can you change the root password on a Linux Red Hat or Centos server?
add a comment
How can you change the root password on a Linux Red Hat or Centos server?
To update the password for root user, follow these steps:
Here is what it will look like from your command shell or terminal:
$ su
Password: *********
# passwd
Password for root: *********
Type new UNIX password: *********
Retype new UNIX password: *********
passwd: password updated successfully
At this point the password for the root user is changed. Next time you try to su to root (switch user to root) you will need to enter your new password that you just set.