In one of my center , its not taking root password. Anyways to recover it ? In other terms , I lost the control of server. Any solution or re-installation is the only way left ? I am using CentOS. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090122/ef95ad6e/attachment.htm
When GRUB comes up, select your boot entry and hit 'e' to edit. Then, arrow down to your kernel line and hit 'e' again. At the very end of that line, simply add the character '1'. Hit enter to save, then 'b' to boot. Your system will now boot up in single user mode and drop you to a root shell without requiring authentication (assuming you haven't previously disabled this default behavior). Run 'passwd' to change your password and reboot/explore. When I've had to use this process, it typically meant the server had been compromised and hosed with a rootkit. If you find odd processes, weird files, getting segfaults for normal applications (bash/grep/vim/etc) then you'll likely want to backup your data and reinstall from scratch. Please post here if you have further problems/questions. Good luck! Tim Nelson Systems/Network Support Rockbochs Inc. (218)727-4332 x105 ----- "David @ULC" wrote:>> In one of my center , its not taking root password. > Anyways to recover it ? > In other terms , I lost the control of server. > > Any solution or re-installation is the only way left ? >>I am using CentOS.> _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090122/29043444/attachment.htm
What I have done in the past to set the password for root is to boot in rescue mode and edit /etc/shadow setting the password to some know value from another system. -- Jim Dickenson mailto:dickenson at cfmc.com CfMC http://www.cfmc.com/ From: "David @ULC" <ucoms2001 at gmail.com> Reply-To: Asterisk Users Mailing List - Non-Commercial Discussion <asterisk-users at lists.digium.com> Date: Thu, 22 Jan 2009 21:22:08 +0530 To: <asterisk-users at lists.digium.com> Subject: [asterisk-users] Root Password not taking In one of my center , its not taking root password. Anyways to recover it ? In other terms , I lost the control of server. Any solution or re-installation is the only way left ? I am using CentOS. _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090122/9f7b6799/attachment.htm
Or boot in single user type passwd and done. 2009/1/22 Jim Dickenson <dickenson at cfmc.com>> What I have done in the past to set the password for root is to boot in > rescue mode and edit /etc/shadow setting the password to some know value > from another system. > -- > Jim Dickenson > mailto:dickenson at cfmc.com <dickenson at cfmc.com> > > CfMC > http://www.cfmc.com/ > > > > ------------------------------ > *From: *"David @ULC" <ucoms2001 at gmail.com> > *Reply-To: *Asterisk Users Mailing List - Non-Commercial Discussion < > asterisk-users at lists.digium.com> > *Date: *Thu, 22 Jan 2009 21:22:08 +0530 > *To: *<asterisk-users at lists.digium.com> > *Subject: *[asterisk-users] Root Password not taking > > > > In one of my center , its not taking root password. > > Anyways to recover it ? > > In other terms , I lost the control of server. > > Any solution or re-installation is the only way left ? > > I am using CentOS. > > ------------------------------ > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090122/3f15b0da/attachment.htm
Jim Dickenson wrote:> What I have done in the past to set the password for root is to boot > in rescue mode and edit /etc/shadow setting the password to some know > value from another system. > -- > Jim Dickenson > mailto:dickenson at cfmc.com > > CfMC > http://www.cfmc.com/ >I personally prefer to chroot into the / partition and run passwd. -- Kind Regards Max Brooks - Developer Legatio Technologies Limited Phone: 01793 520 506 www.legatio.com, www.ftax.co.uk Legatio is part of the Callcredit Information Group: www.skipton.com, www.callcredit.co.uk, www.eurodirect.co.uk Legatio Technologies Limited, One Park Lane, Leeds, West Yorkshire, LS3 1EP Registered in England and Wales No. 4519902 ----------------- Powered by Legatio.com This message is confidential. It may not be disclosed to, or used by, anyone other than the addressee(s). If you receive this message in error, please advise us immediately using the email address info at legatio.com. Internet e-mail is not necessarily secure. Legatio will not accept responsibility for alterations or additions to any e-mail message or attached documents that occur after transmission.
On Thu, Jan 22, 2009 at 11:32 AM, Max Brooks <max at legatio.com> wrote:> Jim Dickenson wrote: > > What I have done in the past to set the password for root is to boot > > in rescue mode and edit /etc/shadow setting the password to some know > > value from another system. > > -- > > Jim Dickenson > > mailto:dickenson at cfmc.com > > > > CfMC > > http://www.cfmc.com/ > > > I personally prefer to chroot into the / partition and run passwd. > >Yep, thats pretty much the best way, and more or less one of the only methods that is going to work regardless of Linux distribution, or other UNIX variant. Many distros now, like most of the UNIXs actually still require your root password when booting single user mode - as they should. Gaining root access to a system even with physical access to the machine *should* be more difficult than simply picking a different grub boot option. I realize that is not the case across all distros, but IMO it should be. For distros that do require a root password when booting single user mode, your only real options have already been mentioned here... 1) boot from a CD, mount your partitions then: a) manually edit /etc/shadow (Linux only) and change the field containing the encrypted password with another encrypted password that you know what the uncrypted version is b) chroot into your mounted partitions and then run passwd as normal (this should be work almost all UNIXs) (b) is the more generic and preferred method IMO - it should work just about everywhere... unless you have total disk encryption or encrypted filesystems and are unable to mount the partitions... in which case... best of luck to you. -- Matt Watson -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090122/d27e5f25/attachment.htm
There have been a number of answers provided. The one that was given to me when I encountered this same problem was to boot a live CD, mount the root file system and delete the password file which would force your normal distro boot to request a new root password next time. HOWEVER, the big deal here is that the most likely cause is the server being hacked. I got hacked a few months ago. Step 1 was log in as root. Step 2 was change the root password. Step 3 was replace a few key executables like ps so I couldn't do administrative tasks. Step 4 was launch a denial of service attack against someone. That is when I discovered the problem, because it ate up all my DSL bandwidth. The problem is that you don't know exactly what files have been changed and if they have left a trap door or something. You could fix the root password, and even discover and restore a few key files, only to find it hacked 5 minutes later because you didn't know everything that had been altered. For that reason, few people will put a system back on line after the root password has been compromised. Re-installation is the only safe way. If some of your directories like /home and /user have separate mount points, they don't have to get wiped out in the process. Wilton -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090122/7fd2547e/attachment.htm
When I boot I get this Error : switchroot: mount failed: No such file or directory kernel panic - not syncing: Attempted to kill init! I tried : 1. Shut down the machine. (Ctrl+Alt+Del) 2. When it reboot and reach the CentOS boot up screen, then press any key to go into a select menu. Then press "e" and navigate to the second line "grub.conf" line (kernel) and press "e" to edit the line to option 1 : <SPACE> 1 (" 1?) at the end of the line. OR option 2: <SPACE> S (" S") a the end of the line OR option 3: add "single" to "ro root=LABEL=/ single" Then hit "ENTER" and press 'b' to reboot. After it reboot, and stop at '#" command line, type "passwd" to create the new root password. Reboot the machine as usual and access your root with new password. On Thu, Jan 22, 2009 at 9:22 PM, David @ULC <ucoms2001 at gmail.com> wrote:> > In one of my center , its not taking root password. > > Anyways to recover it ? > > In other terms , I lost the control of server. > > Any solution or re-installation is the only way left ? > > I am using CentOS. >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20090123/9117b7c8/attachment.htm