On Mon, 9 Nov 1998, Kelvin Teh wrote:
> Doesn't changing the password files require special permissions? If this
> was possible then anyone can hack into Linux systems easily...
> Please tell me if this is possible so that I can take some measures to
> prevent abuse...My Linux box is shared by several users and I do not want
> itchy users to delete my root passwords to put in their own.
Right, only root has access to edit /etc/passwd. That's why you need a
bootdisk - you are logged on as root (or you're in single-user mode, which
for our purposes is equivalent.) You can then mount the partition that
holds your /etc/passwd and have access to edit it. Unless someone has
physical access to the machine, they can't use this method to alter your
passwd file.
--
Matthew Sachs
[EMAIL PROTECTED]
> Matthew Sachs <[EMAIL PROTECTED]> on 11/09/98 01:53:41 PM
>
> To: linux-newbie <[EMAIL PROTECTED]>
> cc: (bcc: Kelvin Teh/SINGALAB)
> Subject: Re: root password
>
> At 11:04 AM 11/9/98 +0000, you wrote:
> >what is the best way to retrieve root password if i forgot it.
> >i'm using linux red hat 5.1
>
> Boot to a linux floppy - with RedHat, make the boot.img and rescue.img from
> the files on the CD (by running rawrite.exe, located in the dosutils
> directory, and specifying \images\boot.img and \images\rescue.img as the
> images). Earlier versions of RedHat don't need a seperate rescue floppy,
> but I believe 5.1 does. Boot to the boot floppy and follow the
> instructions. I don't know what the rescue disk is like, but if it gives
> you a linux prompt then type:
> mount -t ext2 /dev/your_linux_partition /mnt
>
> Use a text editor to edit /mnt/etc/passwd. It consists of several
> colon-seperated fields. Look for the one beginning with root. One of the
> fields will look like garbadge - delete everything between the two colons
> in that field. Save the file, exit, and reboot. Your root password is now
> blank.