LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to recover my root password? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-recover-my-root-password-610785/)

tahrenyie85 01-03-2008 05:09 AM

How to recover my root password?
 
Hi, how can i recover my root password?

Aro2Matic 01-03-2008 05:23 AM

if you are using lilo:
edit boot line and add 'linux single'
and recover with 'passwd'

if you are using grub:
edit boot line and add 'init 0'
and recover with 'passwd'

tahrenyie85 01-03-2008 05:46 AM

Oic. I have 1 more questions. Why i can use sudo -i with my root password. but i can't use my root password using su command?

deepumnit 01-03-2008 05:52 AM

Dear user, the question is not at all clear. Please make it understandable. What are you trying to do? Logging in as SuperUser? You can use the root password to do so :)

tahrenyie85 01-03-2008 05:59 AM

what i meant is, i cannot use su command, but can use sudo -i command when i was using the same root password.

deepumnit 01-03-2008 06:05 AM

What is the mode for the file /etc/sudoers ?

tahrenyie85 01-03-2008 06:16 AM

sudoers mode is -r--r-----

Junior Hacker 01-03-2008 06:17 AM

You can only access root permission with Sudo in Ubuntu, you cannot switch user to root.

Junior Hacker 01-03-2008 06:25 AM

Change root password for Ubuntu or FC.

tahrenyie85 01-03-2008 06:28 AM

ya, but i can use sudo -i but not su. I will try later after changing my root password, thx.

Dinithion 01-03-2008 10:52 AM

Quote:

Originally Posted by tahrenyie85 (Post 3009562)
Oic. I have 1 more questions. Why i can use sudo -i with my root password. but i can't use my root password using su command?

with sudo you have been given spesial privilege, and therefore enter your own password as verification.
su, on the otherhand change to that user (or root if non is specified), and enter the password to the user being su'ed to.

lopoetve 01-03-2008 04:59 PM

Quote:

Originally Posted by tahrenyie85 (Post 3009570)
what i meant is, i cannot use su command, but can use sudo -i command when i was using the same root password.

because SU switches users, not runs commands.


All times are GMT -5. The time now is 11:03 AM.