[Techtalk] I've lost my prompt

Malcolm Tredinnick malcolm at commsecure.com.au
Mon Jul 9 02:53:39 EST 2001


On Sun, Jul 08, 2001 at 01:30:30PM -0400, Glen Strom wrote:
> I have SuSE 7.1 on my machine. I wanted to add some aliases so, 
> being used to Red Hat, I looked for /etc/bashrc. There is none. It 
> seems that SuSE uses /etc/profile for aliases.
> 
> The file says not to put changes in it since you'll lose them during 
> an upgrade. It says create /etc/profile.local. I do that. I add my 
> aliases.
> 
> Now, to active the aliases, I reboot (I don't know how to do it the 
> right way). Kdm starts up. I type in my password.
> 
> Nothing happens. X has hung. I open a console and try to log in as 
> root. There's no prompt. I can type in commands, but nothing 
> happens.
> 
> Where did my prompt go? I don't remember doing anything before 
> creating /etc/profile.local that caused a problem. Does anyone 
> running SuSE have any ideas?

I don't run SuSE, but the "X has hung" bit suggests it's a bit more
serious than just altering your prompt. :(

To make a start on debugging this:
(1) Reboot your box in single user mode ('linux single' at the LILO
prompt). This will just give you a very boring prompt, but it won't
(shouldn't) read /etc/profile.local or anything like that.

(2) Move /etc/profile.local somewhere safe.

(3) Go into normal user moder: you can do 'telinit 3' at this point to go
to runlevel 3 -- no need to reboot.

(4) If you get a prompt now, then /etc/profile.local is guilty as
charged. Otherwise, think harder about what you may have changed,
because it isn't just the profile.local file that is doing strange
things.

To test your changes in future in a slightly less destructive way: just
source /etc/profile.local in a shell to make sure it does what you
expect. That should at least reveal any oddities like if you accidently
make your prompt the same colour as your background.

Hope this helps.

Cheers,
Malcolm

-- 
Nothing is fool-proof to a talented fool.




More information about the Techtalk mailing list