LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Reset password (http://www.linuxquestions.org/questions/linux-newbie-8/reset-password-4175415231/)

bino25 07-06-2012 08:36 AM

Reset password
 
I am in an interesting situation.

I just inherited a server from another admin (appserver1). The ability to ssh as root has been disabled, and the only person who had sudo access to root forgot his password (I can log on as the oracle user).

I tried running sudo as oracle but it fails b/c oracle is not in the sudoers file, and I can't su to the old admin's id b/c the permissions on the su binary has been modified.

My question is, is there a way to reset the old admin's password without having to go into run level 1 and gaining root access that way? I'm just curious.

pixellany 07-06-2012 08:40 AM

You can't necessarily get in by using run level 1---depends how the system is set up.

I only know two ways---both involving booting from a live CD.
1. mount the hard drive and then use chroot to "get inside". Then change the root password normally
2. mount the hard drive and edit /etc/passwd to remove the first "x"---you can then reboot and login as root without a password

silendo 07-06-2012 08:42 AM

No. sorry. You can reset password only in runlevel 1 or with liveCD.
Regards

pixellany 07-06-2012 07:33 PM

Quote:

Originally Posted by silendo (Post 4720803)
No. sorry. You can reset password only in runlevel 1......

No--not always. My current system (Arch) asks for password going to RL-1.

Looking for info on how to change this.......

pixellany 07-06-2012 07:38 PM

http://www.web-manual.net/linux-3/in...gle-user-mode/

tailinlinux 07-06-2012 08:23 PM

Try this one.

Boot on safe mode (if there's a safe mode option on your system)

after loading.

type: init 1 (to enter run level 1)
type: passwd (system will tell you to enter a new password)
type the new password for root:


Hope this help.

rbdharnia 07-07-2012 12:02 AM

u need to use passwd command to change your root password.

and here are the list of other password related tools which may be helpful to u.

http://linuxhelp-rbdharnia.rhcloud.c...jsp?namex=pass

arun5002 07-07-2012 02:22 AM

Hi
Few days back .I faced out different scenerio selinux enable and made me to not to enter into login prompt .These how i solved my problem

http://www.linuxquestions.org/questi...ps-4175412697/

In your scenerio you can put the server in recovery mode chroot into server


Do what pixellany replied you

edit /etc/passwd to remove the first "x"---you can then reboot and login as root without a password

Another solution is

edit /etc/sudoers make the oracle to sudo permission and reboot the server login the server using oracle user and reset root password

pixellany 07-07-2012 02:36 AM

Quote:

Originally Posted by rbdharnia (Post 4721330)
u need to use passwd command to change your root password.

If you read the thread, you will see that the OP cannot log in as root---thus your (obvious) answer is not relevant.

"u"----Did you mean to say "you"?


All times are GMT -5. The time now is 04:28 AM.