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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-06-2012, 08:36 AM
|
#1
|
Member
Registered: Dec 2010
Posts: 50
Rep:
|
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.
|
|
|
07-06-2012, 08:40 AM
|
#2
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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
|
|
|
07-06-2012, 08:42 AM
|
#3
|
Member
Registered: Jun 2012
Location: Italy
Distribution: Slackware 13.37
Posts: 45
Rep:
|
No. sorry. You can reset password only in runlevel 1 or with liveCD.
Regards
|
|
|
07-06-2012, 07:33 PM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by silendo
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.......
|
|
|
07-06-2012, 07:38 PM
|
#5
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
|
|
|
07-06-2012, 08:23 PM
|
#6
|
Member
Registered: Oct 2010
Location: Paudpod, Botolan, Zambales, Philippines
Distribution: Mandriva, Ubuntu, Mint, Open Suse, Meego
Posts: 390
Rep:
|
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.
|
|
|
07-07-2012, 12:02 AM
|
#7
|
LQ Newbie
Registered: Nov 2010
Location: haryana,india
Distribution: fedora
Posts: 5
Rep:
|
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.
|
|
|
07-07-2012, 02:22 AM
|
#8
|
Member
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Rep:
|
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
|
|
|
07-07-2012, 02:36 AM
|
#9
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
Quote:
Originally Posted by rbdharnia
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 02:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|