Red Hat linux 7.3 user name and password

Paul Bryan pa_bryan at yahoo.co.uk
Tue Oct 1 10:58:19 EST 2002


IOn Tuesday 01 October 2002 07:43, Brad Hards wrote:
> On Tue, 1 Oct 2002 07:28, Michael Still wrote:
> > On Tue, 1 Oct 2002, Brad Hards wrote:
> > > > This screen comes after I boot linux system.
> > > > I really don't want to reinstall this because it is
> > > > gonna take another hour.
> > >
> > > There is a way to fix it (using /bin/bash as init), but it is pretty
> > > horrible, and may not work. So if you can't remember the password you
> > > just entered, you'll likely need to re-install.
> >
> > Another option is to boot off the install CD in repair mode, mount the
> > hard disk (something like mount /dev/hda1 /mnt)* and edit the /etc/passwd
> > file... You'd probably be best off asking an experienced user to walk you
> > through this in person, or it will take longer than reinstalling.
>
> This is basically an easier version of replacing init, but it depends on
> being able to boot the CD.
>
> Also, you probably should have shadow passwords, so you need to change
> /etc/shadow, not /etc/passwd.
>
> If I'd just done the install and forgotten the password, I'd probably
> re-install.
>
> Brad

I'd boot into single user. If you're using grub, select the os you want to 
boot (probably only one in your case), the type 'e'. This allows you to edit 
the boot string. Select the line that says kernel, then type 'e'. Append 
'init=1' to the end of the line then hit enter. Now type 'b' for boot. (I 
think that's right - there should be some info on the screen about the 
correct key to press).

Now you have a root shell in single user mode. Type 'passwd' and you can 
change the root password, or passwd <user> to change the password for a 
particular user.

One caveat: If you chose a grub password on install (not the default for 
RedHat 7.3), you'll be prompted to enter it when editing the boot string in 
Grub. If you've forgotten this password you'll have to go with the rescue 
mode option.



More information about the linux mailing list