From owner-freebsd-questions Mon Dec 11 9:19:51 2000 From owner-freebsd-questions@FreeBSD.ORG Mon Dec 11 09:19:48 2000 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from ptavv.es.net (ptavv.es.net [198.128.4.29]) by hub.freebsd.org (Postfix) with ESMTP id 1F57B37B402 for ; Mon, 11 Dec 2000 09:19:48 -0800 (PST) Received: from ptavv.es.net (localhost [127.0.0.1]) by ptavv.es.net (8.10.1/8.10.1) with ESMTP id eBBHGtJ31143; Mon, 11 Dec 2000 09:16:55 -0800 (PST) Message-Id: <200012111716.eBBHGtJ31143@ptavv.es.net> To: Andrey Mavrichev Cc: questions@FreeBSD.ORG Subject: Re: shell In-reply-to: Your message of "Sun, 10 Dec 2000 18:16:55 EST." <3A340EE7.1FD53D3D@yahoo.com> Date: Mon, 11 Dec 2000 09:16:55 -0800 From: "Kevin Oberman" Sender: oberman@ptavv.es.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Date: Sun, 10 Dec 2000 18:16:55 -0500 > From: Andrey Mavrichev > Sender: owner-freebsd-questions@FreeBSD.ORG > > Hi! > > I have installed a FreeBSD on my computer two days ago, and I am new at > this. While attempting to change the shell (from csh to tcsh) that is > loaded for root, I made a mistake. I used the "vipw" command, and > accidently typed "kcsh" instead of "tcsh" (a stupid mistake, I know). I > realized this only after I saved and rebooted the system - and it was > too late. I do not have any other users through which I can get into the > system, and logging as a root only gives an error message that it can't > find the "kcsh" shell. I tried the installation boot floppies to get > into the setup utility, but this didn't work. > > Can you suggest any methods other than re-installation of the system > that can be used to start the proper shell and correct the mistake? Are > there any login commands or options that can be used to start a shell, > or is there any way to get into the set-up utility? Sure. Just boot into single-user mode and re-edit the file. (Single user mode will default to sh as the shell.) To get into single-user mode, re-boot the system (CTRL-ALT-DEL should cleanly shut down the system without you needing to log in). When you get the message to hit return to boot up, press another key (like space). You will get a prompt. Enter the command "boot -s". You will be asked which shell you want to use. Just hit return for sh. Then fsck the root ("fsck -p") and mount the file systems for r/w access ("mount -u /" and "mount -a"). Now you can vipw and edit the shell. But changing the login shell from csh to tcsh is a waste of time as both are the same under V4. > ls -l /bin/csh /bin/tcsh -r-xr-xr-x 2 root wheel 625476 Nov 25 05:11 /bin/csh -r-xr-xr-x 2 root wheel 625476 Nov 25 05:11 /bin/tcsh R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message