• Post Reply Bookmark Topic Watch Topic
  • New Topic

Basic Problem with Enterprise Linux 3 Red Hat  RSS feed

 
Deepak Dew
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Guys,
I am facing a small problem in RHE 3 red hat.
I want that whenever I log in the box suing my login account, certain path and classpaths should be set automatically.
I put those file in .bashrc and .bash_profile files
as
export PATH=.:$PATH:XYZ
export CLASSPATH=$CLASSPATH:abc/wervt/aser/ased

But it seems that neither .bashrc and .bash_profile are getting executed wheneven i log in using telnet from windows machine.

Plz sugggest me with this.

Thanks

Deepak
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure when which file is read, but perhaps .bash_login is used?
I would give it a try.
 
Peter Rooke
Ranch Hand
Posts: 900
7
Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To find out what runs, you could place some echo statements in the different profile files. Then login using a text based tool, like telnet.

I've just always used .profile in the users directory - this may be the old way but it seems to work.

I've found that .bashrc and then .bash_profile run. But I am using a bash shell inside SuSE and not Red Hat.
 
Deepak Dew
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,
neither the .bash_profile nor .bashrc is running I am telnetting thru windows cmd prompt.
I dont have .profile file in my home dir.

Plz give me more pointers
Thanks

deepak
 
Tim Holloway
Saloon Keeper
Posts: 18789
74
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"DeepakD", please review our Naming Policy. We try and avoid confusion here by using real names instead of shortcut names or "handles".

I haven't a clue as to what your problem is, since I telnet and ssh in all the time and my .bash_profile always works. You might check to see if it's properly located (file name ".bash_profile", case sensitive in your home directory) and that you are, in fact using the home directory and command shell that you think you are (look at your login info in /etc/passwd).

You might have to mark .bash_profile as executable to make it work. I forget.

One thing that may help would be to put in an echo statement in .bash_profile that will cause a message to print when it gets executed.

.profile should work, too. It's supposed to be a generic profile that's not shell-dependent. As to which one gets executed first, I'd have to RTFM.
 
Deepak Dew
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
My first name is Deepak and last name is Dew
so, plz let me know if DeepakD is violating any naming policy.

Well, i made the .bashrc and .bash_profile both executables but none of the files are executed when i am telnetting to my account.
I looked inot /etc/passwd and made sure stuffs about my account.

Thanks

Deepak
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!