From owner-freebsd-questions@FreeBSD.ORG Mon Jul 7 07:12:23 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22C59106566C for ; Mon, 7 Jul 2008 07:12:23 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: from hu-out-0506.google.com (hu-out-0506.google.com [72.14.214.234]) by mx1.freebsd.org (Postfix) with ESMTP id 961BC8FC14 for ; Mon, 7 Jul 2008 07:12:22 +0000 (UTC) (envelope-from sonic2000gr@gmail.com) Received: by hu-out-0506.google.com with SMTP id 34so7149881hue.8 for ; Mon, 07 Jul 2008 00:12:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=zsr2YC6DpzW7pP7iZw7BC7LhYoU4CUOzEDJFZrff6SY=; b=UWSUi5JCp/Ge07DJyJt9r60UX1VapjJrn2lnsPHfzt8O0ZwvsgpyeYIZ3kTDkGAp57 Gp27Oi4xkTdkzNOH0zNOWP0Zts/yzMsvBHgU1YJfXDFJMAb737rF2CmXyxW1gc2yRMkX e78w4su7tVgAxfBrw5+LB6s/M1wybleGEt9aI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=sytfgaAL/LIqJHTPVaVpKde8rk6+8SztyWr/EgqvHp8NscZP55FXIypHYaR5iw7ktR 9MAHD4qS4/k0RVFsbnAZ/EnO0UXaV7MtM4+T/Mga97cE9RGAISkDkEtc5oZJdntDlAFQ fzhWmZFXv6t8NWBB/hhlhD9iedgRwm84F46gQ= Received: by 10.86.49.13 with SMTP id w13mr3774360fgw.65.1215414741214; Mon, 07 Jul 2008 00:12:21 -0700 (PDT) Received: from atlantis.dyndns.org ( [87.203.106.188]) by mx.google.com with ESMTPS id l19sm4702631fgb.7.2008.07.07.00.12.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 07 Jul 2008 00:12:20 -0700 (PDT) Message-ID: <4871C1D1.4020405@gmail.com> Date: Mon, 07 Jul 2008 10:12:17 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.14 (X11/20080703) MIME-Version: 1.0 To: Mukarram Syed References: <762991.63396.qm@web31501.mail.mud.yahoo.com> In-Reply-To: <762991.63396.qm@web31501.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Recovering root password from a drive by mounting the cdrom X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 07:12:23 -0000 Mukarram Syed wrote: > Thanks for this response and others. > However, my problem does not look to be so simple. > > I boot off the install cd and get into the fixit prompt. > > I dmesg | less and get the device name that I think is my hard drive /dev/ad0. > I fdisk /dev/ad0 and get information about 3 slices. I am think /dev/ad0 slice 3 is the root file system because slice 3 has a greatest amount of disk space and that looks like my root partition > Then I ls -l /dev |grep ad0 and it spits out a number for /dev/ad0 like ad0s0 ad0s1 ad0s3 etc. > I am assuming /dev/ad0s3 is slice 3 which I believe it to be my root partition. > So I mount it: > mount /dev/ad0s3 /mnt > I do a df -k and find that /mnt has 0 bytes available. To check I cd /mnt and ls and don't find any data in it. > I check/dev/ad0s2 /dev/ad0s1 in the same way. None of it has any data. > > I guess there is something else that I am missing at this point. > > Can anyone advise. > > Thanks > > # mukarram > > > Mukarram Syed > muksyed@yahoo.com > > > There must be something wrong if don't see any partitions in any of the slices. You should see something like ad0s1a, ad0s1d, ad0s1f ... Are you able to boot the server normally, from its own disk? Are you able to boot into single user mode, by selecting it from the boot menu? If you can boot into single user mode, you can change the password immediately by doing something like: mount -o rw / mount -a passwd (then exit and boot will continue) If you are asked for a root password when going into single user mode, your console has been marked as 'insecure' in /etc/ttys. You will need to boot with the live CD, mount the root partition and change /etc/ttys, then reboot in single user mode and change the password. This is the easiest way IMHO. If you are not asked for a password when getting into single user mode, you don't need the live CD at all.