Scientific Linux Forum.org



  Reply to this topicStart new topicStart Poll

> forgot root password
mtech84
 Posted: Jun 27 2013, 03:24 AM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 2582
Joined: 27-June 13









Hello All,

I forgot my root password, i had setup scientific linux using virtual machine windows software.

i am able user login.

from there I tried sudo and sudo -i , sudo -u , and whenever I enter the password for the user, i get the error message

[sudo] password for user:
user is not in the sudoers file. This incident will be reported.

please tell me how do i get back to root login or change the password for the root login .

Appreciate ,

Thanks
PM
^
tux99
 Posted: Jun 27 2013, 03:45 AM
Quote Post


SLF Moderator
********

Group: Moderators
Posts: 1273
Member No.: 224
Joined: 28-May 11









Try su - root

Else you will have to boot from CD/DVD or USB stick and then mount the SL partition and reset the password in /etc/shadow manually.

--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
(can be used together with EPEL and ELRepo repositories) - repository mirror: http://linuxsoft.cern.ch/linuxtech/el6/
PM
^
mtech84
 Posted: Jun 27 2013, 04:15 AM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 2582
Joined: 27-June 13









QUOTE (tux99 @ Jun 26 2013, 05:45 PM)
Try su - root

Else you will have to boot from CD/DVD or USB stick and then mount the SL partition and reset the password in /etc/shadow manually.



Thanks a lot, can you please provide the steps
PM
^
tux99
 Posted: Jun 27 2013, 04:23 AM
Quote Post


SLF Moderator
********

Group: Moderators
Posts: 1273
Member No.: 224
Joined: 28-May 11









QUOTE (mtech84 @ Jun 27 2013, 05:15 AM)

Thanks a lot, can you please provide the steps


I haven't done this in many years so I can't give you exact steps.

Centos has a procedure that seems even easier, try this one it should work the same on SL:
http://wiki.centos.org/TipsAndTricks/ResetRootPassword

--------------------
My personal SL6 repository, specialized in audio/video software: http://pkgrepo.linuxtech.net/el6/
(can be used together with EPEL and ELRepo repositories) - repository mirror: http://linuxsoft.cern.ch/linuxtech/el6/
PM
^
mtech84
 Posted: Jun 27 2013, 04:55 AM
Quote Post


SLF Newbie


Group: Members
Posts: 3
Member No.: 2582
Joined: 27-June 13









QUOTE (tux99 @ Jun 26 2013, 06:23 PM)
QUOTE (mtech84 @ Jun 27 2013, 05:15 AM)

Thanks a lot, can you please provide the steps


I haven't done this in many years so I can't give you exact steps.

Centos has a procedure that seems even easier, try this one it should work the same on SL:
http://wiki.centos.org/TipsAndTricks/ResetRootPassword


Thanks, the pain of doing this, helped me and now i remember my passw..

PM
^
warren
 Posted: Jul 15 2013, 01:46 PM
Quote Post


SLF Newbie


Group: Members
Posts: 6
Member No.: 2615
Joined: 14-July 13









If you have not setup Password for single user mode, it is very easy to stop grub, edit the kernel line and add "single" at the end of the line and then boot from that kernel.

01. space or any key to stop grub from auto booting.
02. type "e" on the first boot line.
03. go to the kernel line and type "e" again.
04. At the end of the line, type "single" and press enter.
05. Type "b" to boot the system using the edited kernel line.

This will drop you to single user mode and root shell.

Here you can change root password.
PM
^
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Reply to this topicStart new topicStart Poll