LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2012, 08:36 AM   #1
bino25
Member
 
Registered: Dec 2010
Posts: 50

Rep: Reputation: 11
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.
 
Old 07-06-2012, 08:40 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
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
 
Old 07-06-2012, 08:42 AM   #3
silendo
Member
 
Registered: Jun 2012
Location: Italy
Distribution: Slackware 13.37
Posts: 45

Rep: Reputation: Disabled
No. sorry. You can reset password only in runlevel 1 or with liveCD.
Regards
 
Old 07-06-2012, 07:33 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by silendo View Post
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.......
 
Old 07-06-2012, 07:38 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
http://www.web-manual.net/linux-3/in...gle-user-mode/
 
Old 07-06-2012, 08:23 PM   #6
tailinlinux
Member
 
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Blog Entries: 3

Rep: Reputation: 25
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.
 
Old 07-07-2012, 12:02 AM   #7
rbdharnia
LQ Newbie
 
Registered: Nov 2010
Location: haryana,india
Distribution: fedora
Posts: 5

Rep: Reputation: 0
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

Last edited by rbdharnia; 07-07-2012 at 12:11 AM.
 
Old 07-07-2012, 02:22 AM   #8
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
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
 
Old 07-07-2012, 02:36 AM   #9
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by rbdharnia View Post
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"?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reset password ? vibinlakshman Ubuntu 15 07-08-2012 09:13 AM
[SOLVED] Password reset srajeeb Linux - Newbie 5 05-01-2012 02:44 PM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
reset password duki Linux - Newbie 5 09-05-2007 04:12 AM
Password reset hongman Linux - Newbie 2 07-11-2005 05:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration