I forget the root password.How to recover the root password?
Thanks in advance. rsm
On Thu, 2005-09-08 at 20:32 +0530, subramani r wrote:
I forget the root password.How to recover the root password?
1. Boot off of a rescue CD 2. mount the / partition to /mnt 3. edit /mnt/etc/shadow 4. zap the password field (see man 5 shadow) 5. Upon reboot: login and change the password
-- Arun Khan (knura at yahoo dot com) Never worry about theory as long as the machinery does what it's supposed to do. -- R. A. Heinlein
I forget the root password.How to recover the root password?
- Boot off of a rescue CD
- mount the / partition to /mnt
- edit /mnt/etc/shadow
- zap the password field (see man 5 shadow)
- Upon reboot: login and change the password
Instead boot in single user mode and change the password to what ever you want.
Instead boot in single user mode and change the password to what ever you want.
right..that would save a lot of hassles.
navin.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On 09/09/05, Rohit Baisakhiya rohitbaisakhiya@gmail.com wrote:
Instead boot in single user mode and change the password to what ever you want.
Not if boot loader passwd was set during installation and that passwd has been forgotten too. If that is the case then Arun method will apply.
On Fri, 2005-09-09 at 10:22 +0530, Rohit Baisakhiya wrote:
I forget the root password.How to recover the root password?
- Boot off of a rescue CD
- mount the / partition to /mnt
- edit /mnt/etc/shadow
- zap the password field (see man 5 shadow)
- Upon reboot: login and change the password
Instead boot in single user mode and change the password to what ever you want.
It is distro dependent -
SuSE 9.3 - need root password to boot into runlevel 1 FC 4 - !need root password to boot into runlevel 1 (I guess the same for derivatives of Fedora/Redhat)
Debian - ??
Arun K. Khan wrote:
On Fri, 2005-09-09 at 10:22 +0530, Rohit Baisakhiya wrote:
I forget the root password.How to recover the root password?
- Boot off of a rescue CD
- mount the / partition to /mnt
- edit /mnt/etc/shadow
- zap the password field (see man 5 shadow)
- Upon reboot: login and change the password
Instead boot in single user mode and change the password to what ever you want.
It is distro dependent -
SuSE 9.3 - need root password to boot into runlevel 1 FC 4 - !need root password to boot into runlevel 1 (I guess the same for derivatives of Fedora/Redhat)
For distros that need root passwd for runlevel 1, the CD is required. However if the root operator has forgotten his existing password, it will be necessary in *both* bootup cases to delete the password entry either in /etc/shadow as mentioned by Arun or delete the second field entry 'x' in the /etc/passwd on the line corresponding to the root user. Then set a new password.
Regards,
Rony.
___________________________________________________________ To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com
Rony Bill wrote:
Arun K. Khan wrote:
On Fri, 2005-09-09 at 10:22 +0530, Rohit Baisakhiya wrote:
I forget the root password.How to recover the root password?
- Boot off of a rescue CD
- mount the / partition to /mnt
- edit /mnt/etc/shadow
- zap the password field (see man 5 shadow)
- Upon reboot: login and change the password
Instead boot in single user mode and change the password to what ever you want.
It is distro dependent -
SuSE 9.3 - need root password to boot into runlevel 1 FC 4 - !need root password to boot into runlevel 1 (I guess the same for derivatives of Fedora/Redhat)
For distros that need root passwd for runlevel 1, the CD is required. However if the root operator has forgotten his existing password, it will be necessary in *both* bootup cases to delete the password entry either in /etc/shadow as mentioned by Arun or delete the second field entry 'x' in the /etc/passwd on the line corresponding to the root user. Then set a new password.
A CD is not all required, just append the parameter init=/bin/bash to the kernel line in grub.conf, it works in suse as well.
mifthas haris
On Sun, 2005-09-11 at 08:43 +0400, mifthas haris wrote:
A CD is not all required, just append the parameter init=/bin/bash to the kernel line in grub.conf, it works in suse as well.
Ah, hah. Have not done this for a long time (LILO many moons ago) and completely forgot about it. Thanks for doing an "fg" on my grey cells :)
-- Arun Khan (knura at yahoo dot com) Only through hard work and perseverance can one truly suffer.
On Friday 09 September 2005 16:49, Arun K. Khan wrote:
It is distro dependent -
SuSE 9.3 - need root password to boot into runlevel 1 FC 4 - !need root password to boot into runlevel 1 (I guess the same for derivatives of Fedora/Redhat)
Debian - ??
I guess debian too requires the root password. Another method which I guess would work is boot off using the knoppix CD. Mount the root partition and then kill the root password. But this is just theory. I havent tried it practically :)
On Fri, 2005-09-09 at 23:54 +0000, Dinesh Joshi wrote:
I guess debian too requires the root password. Another method which I guess would work is boot off using the knoppix CD. Mount the root partition and then kill the root password. But this is just theory. I havent tried it practically :)
This is what I said in my first post and it works :) It really doesn't matter whether you use the distro's CD/DVD in rescue mode or use Knoppix or any other "recovery" CD/floppy based distros - as long as it supports the files system modules for your / fs.
hi all, i have recently compiled a running Linux-From-Scratch system. and it feels great to see what linux can achieve in just about 280 Mb of installation. primarily my aim was to compile a system which would have a decent gui and would be low on resources (i have a slow system... and after loading KDE, there is hardly any big app i can run without waiting for ages). i selected fluxbox as the window manager and xplore as the file manager. but well, i havn't reached that far yet... incidentally i changed my mind and decided to concentrate on security first. yeah, the basic system is already quite good on security. but this project may quite possibly be transformed into a distro. so now you know what lines i am thinking on.
any suggestions as to what is best to be included? well you may suggest both on the security front as well as the gui front.
regards, navin. (PS: being an RHEL user, PAM and SELinux are in my mind.... what else?? )
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
On Saturday 10 September 2005 17:05, navin jathan wrote:
*snip*
any suggestions as to what is best to be included? well you may suggest both on the security front as well as the gui front.
Depends on what kinda distro do you want to make. What is its purpose? Basically, linux is quite safe even with the standard security features. Is this distro going to be security oriented?
P.S.: Start a new thread by composing a new email. Don't reply to any email to start a new thread...
---- Dinesh A. Joshi
On Sat, Sep 10, 2005 at 10:05:14AM -0700, navin jathan wrote:
hi all, i have recently compiled a running Linux-From-Scratch system. and it feels great to see what linux can navin.
<snip>
(PS: being an RHEL user, PAM and SELinux are in my mind.... what else?? )
Try the grsecurity patches, LIDS, OpenWall and Sysmask patches.
If you want GUI, then try out IceWM or maybe XFCE
Nosferatu
On Saturday 10 September 2005 10:35, Arun K. Khan wrote:
This is what I said in my first post and it works :) It really doesn't matter whether you use the distro's CD/DVD in rescue mode or use Knoppix or any other "recovery" CD/floppy based distros - as long as it supports the files system modules for your / fs.
Ah...thanks :)
Arun K. Khan wrote:
On Fri, 2005-09-09 at 10:22 +0530, Rohit Baisakhiya wrote:
I forget the root password.How to recover the root password?
- Boot off of a rescue CD
- mount the / partition to /mnt
- edit /mnt/etc/shadow
- zap the password field (see man 5 shadow)
- Upon reboot: login and change the password
Instead boot in single user mode and change the password to what ever you want.
It is distro dependent -
SuSE 9.3 - need root password to boot into runlevel 1 FC 4 - !need root password to boot into runlevel 1 (I guess the same for derivatives of Fedora/Redhat)
Debian - ??
In debian you have option in Grub to boot debian in recovery mode, Boot the debian in recovery mode. 1> This will mount the root partition only in read mode. So You have to mount the root partition .....
#mount / -oremount,rw #passwd root
This will allow to change the root password.
If you don't have the Revovery mode then don't worry about it.
There is another good trcik......
When you enter in to grub select the any of your running kernel...(Because i have 5 Kernel). Pres 'e' button to edit the argument for that kernel. Select ...
kernel /boot/vmlinuz-2.6.13.1 root=/dev/hda1 ro
Press again 'e' for edit this argument...And simply put 'init=/bin/sh' Press enter then 'b' to boot that kernel that will boot Linux box in Recovery mode. Now again follow the <1>....
This trick can work in any Linux distro..... ;)
With Cheers, Hardik Dalwadi.