You can log in with single-user mode and create a new root password.
Reboot your computer. If you are currently set up to log in to X
rather than a console, you will need to press
[Ctrl]-[X] when
prompted. When you see the boot: prompt, type
linux single to enter single-user mode. Some of
the filesystems will be mounted, and you will find a
bash# prompt when you've entered single-user mode
(note that this prompt will look somewhat different than the prompt
you're accustomed to).
Now, you can change root's password by typing
You'll be asked to re-type the password for verification. Once you're
finished, the password will be changed and you can reboot by typing
shutdown -r now at the prompt; then you can log in
to root as before.
I forgot or want to change my user account password.
Open a shell prompt and log in as root (su -
and root password). Then type linuxconf at the
prompt. This will open the linuxconf tool.
Click on User accounts to expand that part of the
tree and then click on Normal. Under
Normal, click on User
Accounts again. A list of user accounts will appear.
Select the user name you need a password for and the Base
information tab appears. Click on
Passwd and a New UNIX
password dialog appears. Enter the new password for this
user account. If you forgot your old one, you have to select a new
one; Linux will not tell you your old password. Click on
Accept.