Go Job Hunting at the LQ Job Marketplace
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


LinkBack Search this Thread
Old 03-21-2007, 08:27 AM   #16
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30

Err, I wrote faster than I could think. Sorry.
propably, you cannot edit your bashrc, because you cannot launch any editor...

So you have to use the full path to launch your programs. The full path can change due to your linux distribution.
On my ubuntu box, I have the editors
vim at: /usr/bin/vi
nano at: /usr/bin/nano

You can become root with:
/bin/su - assuming that su is into /bin and root has a valid password.
After giving the root password, you get a functional root shell enabling you to fix your $USER_HOME/.bashrc.

If you use an ubuntu with disbaled root account, you can do
/usr/bin/sudo passwd <enter>
your user password <enter>
new root password <enter>
retype new root password <enter>
After this procedure, you can proceed with the su thing above.
Perhaps there is a more elegant way, but this is the first one I have in my mind.

Good luck!
Old 03-22-2007, 03:32 AM   #17
LQ Newbie
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
and another problem now :(

Dear Clemente,

Thanks for all the help. i am now into a new problem. i am using Putty to access the server using root login.

i modified the /etc/profile yesterday and since then, i am unable to log on again. when i enter the password for the user root, it only displays the time when i last logged on but i do not get the command shell.

i am surely not going to modify this profile again because everytime i modify it, i land in trouble. is there any way i can get back the command shell after i login so that i can modify /etc/profile back to its original state?

thanks and kind regards,
Old 03-22-2007, 09:20 AM   #18
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Sounds little unproductive... Would not have happened in a per user configuration

I have some questions:
What did you change into the /etc/profile? I don't think that only a modified $PATH can lead into your situation. Please post the actual content of this file as precise as you can remember...
Did you change anything else within your last root session?
Do you have some user accounts on your system?
Does your provider give you access over a remote serial device?
And finally: Do you have access to any other linux machine?

What you can do depends on what is the concrete situation...

I am not sure.. Does putty only opens a remote shell? Or can it be used to launch any command by ssh? I can check it tomorrow.


I forgot: Another thing I would try to check my posibilities: If no easy access to another linux machine is here and no linux live cd flies around, I would install winscp (you can get it here) and try, if I can use it to copy files to my server.
Old 03-22-2007, 10:17 AM   #19
LQ Newbie
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Dear Clemente,

I installed JDK1.5.0 and Tomcat 5.5.9, then i modified the /etc/profile as i mentioned in my last message. and since then, i am unable to even log on to the server.

unfortunately, i dont have any other user account to test and cant even create one and no other linux machine around i am new to linux and just followed the instructions found on internet to install jdk and tomcat. eventually messed up everything.

this is a VPS and hosting company is not answering the queries, may be they usually take this long to solve the problems.

Old 03-22-2007, 12:17 PM   #20
LQ Newbie
Registered: Mar 2007
Posts: 15

Original Poster
Rep: Reputation: 0
fixed again

thank God. sorted the problem once again. thanx for your help Clemente.

Now next step. i have jdk 1.4.2 and tomcat 4.1.3 installed on the server and need to install jdk 1.5.0 and tomcat 5.5.9. what are the exact steps required to do that?

i dont want to follow the document i used earlier.

kind regards,
Old 03-22-2007, 03:04 PM   #21
Registered: Aug 2003
Distribution: Debian, Ubuntu
Posts: 188

Rep: Reputation: 30
Nice to read you are back in business

IIRC, installing tomcat is not that difficult.
1) Install the java jdk 1.5.0
You can download an executable binary. If compressed, extract it, and run the installer. I think it asks you where you want to install java - perhaps /usr/local/ would be a good place.
If done, you should have a directory similar to /usr/local/j2sdkblablabla. I would do a symlink "ln -s /usr/local/j2sdkblablabla /usr/local/java" for convenience.
2) Istall tomcat.
Installing tomcat is just downloading and decompressing the file. A good place would be /usr/local/jakarta-tomcat-blablabla. Again, a symlink "ln -s /usr/local/jakartablablabla /usr/local/tomcat" would be nice.
3) Starting tomcat
To start tomcat, you should do at least two things:
# Set the $JAVA_HOME so that tomcat knows, where to find java
export JAVA_HOME="/usr/local/java";
# Start tomcat
Write a little script for this tasks.

You can do all these things as non privileged user. Simply create a user, log in as that user and you can do everything without any chance to wreck the system. Off course you cannot manipulate the /usr/local directory, but tomcat runs fine in /home/myuser/tomcat, too. Java can be in /home/myuser/java. If everything works to your desires, you can copy the files into any system directory later.

CAUTION: I write all this out of my head! This is no howto and no step by step instruction, there surely are some details not mentioned. And the most important: I did not test it. I think, I always do it the mentioned way, and I don't think, that these steps above can harm your system.

And another thing: I don't know how experienced you are - if you want to manage a productive server, please make yourselve comfortable with Linux tools and the servers you want to run. A lot of spam is made possible due to misconfigured servers, e.g.



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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem in psotgres7.4 with jdk1.3 mufy General 0 10-19-2004 05:44 AM
java jdk1.4.2 & free: installation performed but javac doesn't run Dominik *BSD 3 02-18-2004 03:42 AM
JDK1.3 and Fonts cptfuture Linux - Software 2 05-26-2001 10:57 AM
JAVA Jdk1.3????? oulevon Programming 0 03-04-2001 06:47 PM
Path for jdk1.3.0_02 oulevon Linux - Newbie 1 03-01-2001 08:06 PM

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

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