LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-06-2007, 11:27 PM   #1
Ordinary12
Member
 
Registered: Feb 2007
Posts: 140

Rep: Reputation: 15
I'm locked out of my computer!!!!


I went to Fedorasolved.com and was following the directions for installing Java on my system but I was a little too literal in following the directions. I opened /etc/profile.d/java.sh script and added the following to it:

cat <<EOF>> /etc/profile.d/java.shexport JAVA_HOME=/opt/jre1.6.0_01export PATH=\$JAVA_HOME/bin:\$PATH
EOF
After closing it I got the following message when I restarted Fedora:
localuser:kendall being added to access control list
/etc/profile.d/java.sh: line 3: EOF: command not found
/etc/bash rc: line 8: id: command not found
/etc/bash rc: line 8: id: command not found
Couldn't exec gnome-session: No such file or directory

I can't login to my computer now and I wanted to know if anyone knows how to fix this?
 
Old 06-07-2007, 06:19 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Using the installation media (first CD or the DVD) boot into rescue mode by typing: linux rescue

Answer a few questions then delete or edit the /etc/profile.d/java.sh file:

To delete type: rm /mnt/sysimage/etc/profile.d/java.sh

FYI: The file should look something like (assuming one used an rpm version of Sun's java package).........

For jre;

export JAVA_HOME="/usr/java/jre1.6.0_01/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

For jdk;

export JAVA_HOME="/usr/java/jdk1.6.0_01/jre/bin"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME"

The file also need to be executable, so when done recreating or editing this file you may want to do:

chmod u+x /etc/profile.d/java.sh

Last edited by Lenard; 06-07-2007 at 06:21 AM.
 
Old 06-07-2007, 07:59 PM   #3
Ordinary12
Member
 
Registered: Feb 2007
Posts: 140

Original Poster
Rep: Reputation: 15
Hey Lenard:

I'm not at home for the next two weeks so I don't have access to a Fedora DVD. I got a message from someone last night that told me I could go into the grub menu by hitting "a" when the system is about to boot. I did this but he didn't really explain what I should do next. I have two entries in the menu so I highlighted the top one and pressed the "e" button to edit it. Once I did that I had three entries to choose from. The top one was root, the second said kernel, and the third....I can't remember the third. What should I do?
 
Old 06-07-2007, 08:57 PM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
Select the kernel line and press the 'e' key, add a space followed by the number 1. When done press the 'Enter' key followed by the 'b' key, log on as root and supply the password when prompted.
 
Old 06-08-2007, 12:32 AM   #5
Ordinary12
Member
 
Registered: Feb 2007
Posts: 140

Original Poster
Rep: Reputation: 15
I did exactly what you said and got to a command line that states the following:
sh-3.1#
I typed the following:
rm /etc/profile.d/java.sh
This is what I got:
rm command not found.

What am I doing wrong?
 
Old 06-08-2007, 05:51 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 57
In single user mode one has to supply the full path to the command:

/bin/rm /etc/profile.d/java.sh
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The computer I'm compiling LFS on locked up. How long should I wait? creativename Linux From Scratch 1 04-07-2007 07:31 PM
Computer locked up entirely, now HD in error General Linux - Hardware 1 05-23-2006 11:00 PM
Why Scourge (2nd computer) isn't getting ip address from Misery (1st computer) dhcp? pslave Linux - Networking 2 04-09-2006 05:58 AM
Can't copy files from an SCO Unix System V computer to a Linux computer gnppapas Linux - General 2 11-27-2004 01:39 PM
Help! Locked myself out of my computer with Netconfig Host Login OldManTrue Linux - Networking 2 06-17-2003 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration