HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Root Passwd For LInux
Operating System - Linux
1834483
Members
3229
Online
110067
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
08-11-2002 05:51 AM
08-11-2002 05:51 AM
Root Passwd For LInux
I Have Forgotten My Linux Root Passwd , How do i recover the Passwd , One was is to INterupt the Boot in Single user mode and change the Passwd , Also I dont have the Boot Floppy,
Any One Please Help On this..
Thanks IN ADvance
Asif
Any One Please Help On this..
Thanks IN ADvance
Asif
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2002 07:30 AM
08-11-2002 07:30 AM
Re: Root Passwd For LInux
Hello Asif,
I can suggest an ultimate method that needs the installation bootable cd-rom.
=> Boot on the CD-Rom as if you wanted to re-install your Linux box.
=> Go through the steps until partitioning (BE CAREFUL AND DO NOT CHOOSE AUTOMATIC PARTITIONING)
=> When you reach the partitioning step, just type CTRL-ALT-F2 to open a console shell.
=> Try to find the device file that matches your Linux root partition. If it does not exist (either in /tmp or /dev), just create it manually :
mknod b
where :
For IDE :
device=/dev/hd[abcd] (n=partition number)
major=3
minor=0,64 for /dev/hda,hdb
For SCSI :
device=/dev/sd[abcd] (n=partition number)
major=8
minor=0,16,32,... for /dev/sda,sdb,sdc,...
For example : if you have only one IDE disk with root partition being the 2nd one :
mknod /dev/hda2 b 3 2
=> Create a mount point and mount your root filesystem like this :
mkdir /my_root
mount /dev/hda2 /my_root
=> Use chroot to change your current root directory :
/my_root/sbin/chroot /my_root
=> Mount /proc and /usr like this :
mount /proc
mount /usr
=> Change your root password :
passwd
...
...
=> Unmount all filesystems and exit from the "chrooted" environment :
umount /usr
umount /proc
exit
=> Unmount your root filesystem and reboot
umount /my_root
Good luck !
Kodjo
I can suggest an ultimate method that needs the installation bootable cd-rom.
=> Boot on the CD-Rom as if you wanted to re-install your Linux box.
=> Go through the steps until partitioning (BE CAREFUL AND DO NOT CHOOSE AUTOMATIC PARTITIONING)
=> When you reach the partitioning step, just type CTRL-ALT-F2 to open a console shell.
=> Try to find the device file that matches your Linux root partition. If it does not exist (either in /tmp or /dev), just create it manually :
mknod
where :
For IDE :
device=/dev/hd[abcd]
major=3
minor=0,64 for /dev/hda,hdb
For SCSI :
device=/dev/sd[abcd]
major=8
minor=0,16,32,... for /dev/sda,sdb,sdc,...
For example : if you have only one IDE disk with root partition being the 2nd one :
mknod /dev/hda2 b 3 2
=> Create a mount point and mount your root filesystem like this :
mkdir /my_root
mount /dev/hda2 /my_root
=> Use chroot to change your current root directory :
/my_root/sbin/chroot /my_root
=> Mount /proc and /usr like this :
mount /proc
mount /usr
=> Change your root password :
passwd
...
...
=> Unmount all filesystems and exit from the "chrooted" environment :
umount /usr
umount /proc
exit
=> Unmount your root filesystem and reboot
umount /my_root
Good luck !
Kodjo
Learn and explain...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2002 02:27 PM
08-12-2002 02:27 PM
Re: Root Passwd For LInux
Asif,
The idea of interrupting bootup and booting to single user mode is the simplest, and should not require a Boot floppy.
The exact procedure depends on whether you use LILO or GRUB as your boot loader. For both there is typically a 10 second window where you can enter options to the boot loader, select from bootable kernel versions, etc.
For LILO, enter
linux single
when the system gets to this pause
For GRUB, it's a little trickier, as often there's a password set for bootup (security measure to prevent what you're trying to accomplish) Assuming that there is no boot password, hit whichever function key the prompt says to enter to get the grub> prompt, then
grub> kernel /vmlinuz root=/dev/hda1
grup> boot single
This should do the trick
hth
Mark
The idea of interrupting bootup and booting to single user mode is the simplest, and should not require a Boot floppy.
The exact procedure depends on whether you use LILO or GRUB as your boot loader. For both there is typically a 10 second window where you can enter options to the boot loader, select from bootable kernel versions, etc.
For LILO, enter
linux single
when the system gets to this pause
For GRUB, it's a little trickier, as often there's a password set for bootup (security measure to prevent what you're trying to accomplish) Assuming that there is no boot password, hit whichever function key the prompt says to enter to get the grub> prompt, then
grub> kernel /vmlinuz root=/dev/hda1
grup> boot single
This should do the trick
hth
Mark
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP