- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- I forgot my root password
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2005 08:01 PM
тАО03-03-2005 08:01 PM
I forgot my root password
I have suse 8.2 Linux installed on my network. I forgot my root password. How do I regain root permission? Also, how do I boot to single user mode?
Thanks
Charles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2005 08:58 PM
тАО03-03-2005 08:58 PM
Re: I forgot my root password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2005 11:55 PM
тАО03-03-2005 11:55 PM
Re: I forgot my root password
fastest way is following
reboot
issue init=/bin/bash like kernel parameter (before loading kernel)
mount -n -o remount,rw /
passwd
and that's all
rgds Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 12:42 AM
тАО03-04-2005 12:42 AM
Re: I forgot my root password
Kind of a circle.
What you can do is boot off of a special emergency cd/disk that you created at install time. With this you may be able to edit the /etc/shadow file and null out the root password.
Then there will be no root password, so you will have to immediatly log on and set it.
Downtime required.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 01:19 AM
тАО03-04-2005 01:19 AM
Re: I forgot my root password
boot system with single mode and perform command "passwd" to change password.
NiCK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 01:45 AM
тАО03-04-2005 01:45 AM
Re: I forgot my root password
It doesn't ask for the old password and no login is needed.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 02:02 AM
тАО03-04-2005 02:02 AM
Re: I forgot my root password
If you're using grub...
interrupt the grub loader (hopefully you've got a pause there) by just hitting the arrow key around at the menu choice for the grub loader - this will make the timer countdown stop.
Then,
go to the line that holds your choice of the Linux load you want and hit "e" (for edit). This will bring you into an editor for the current load command. Choose the line you want ( I can't remember which one you need off the top of my head - there's probably two - try it on both), and hit "e" once again. Now, you should be editing a single line of the loader. Arrow key to the end of teh command and and the parameter "single" to the end of the line. Hit enter to "save" (only in the buffer - not on the disk) the command.
At this point - I think you hit "B" to boot it (read the screen).
System should boot into single user mode - needing no password. Change your password with the password command.
BTW, this is all a very good reason to lock your cabinet(s) for your servers and/or use bios password protection to boot the server, AND have a keypad lock on the server room...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 03:26 AM
тАО03-04-2005 03:26 AM
Re: I forgot my root password
I was able to change the root password on single user mode but I can't log-in as root on the multiuser mode. I tried manipulating the /etc/passwd file, because, I discovered that there is no entry for root shell, even as root in the single user mode, all I get is the that - this file is read only. I check the file as root, the permission is 644. What do I do next?
Charles
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 04:51 AM
тАО03-04-2005 04:51 AM
Re: I forgot my root password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 04:59 AM
тАО03-04-2005 04:59 AM
Re: I forgot my root password
If you have shadow passwords in use then it is no use to edit the /etc/passwd file.
You should erase the password field from the shadow password file. Could be named /etc/shadow or similar in linux flavors...
Regards,
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2005 05:08 AM
тАО03-04-2005 05:08 AM
Re: I forgot my root password
I have no more to add to the solutions of others, the way I've rooted boxes in the past has already been outlined:
boot single user
mount / rw
remove all the hashed characters in /etc/shadow for the root user
reboot login as root and run passwd to set a new pass
What I suggest beyond the solution is the prevention of this happening again. The command sudo is great for this kind of thing. Here is a mini howto outlining the steps for using sudo.
http://www.chinalinuxpub.com/doc/www.siliconvalleyccie.com/linux-hn/sudo.htm
Hope that helps,
--Dave