• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Basic Problem with Enterprise Linux 3 Red Hat

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1155
20
Mac OS X IntelliJ IDE Oracle Spring VI Editor Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic