Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Manipulating the ./profile on a Sun 7

Status
Not open for further replies.

menace212

Programmer
Jul 11, 2003
144
US
I'm trying to manipulate the ./profile on a sun 7 machine so the users don't always have to type
./ovw when starting the HPOpenview and they can type it anywhere not just where ovw is located. If I edited the .profile to show (PATH=$PATH:/opt/ov/bin:...)then export it, would this work or do I need to do in the .bashrc?
 
PATH statements are usually in .profile rather than an environment file. But why not put it in /etc/profile, which is executed for every user when they log in (before their own .profile)? Just make sure that if they add a PATH statement in their .profile, they include $PATH in it.
 
So if I add (PATH=$PATH:/opt)under /etc(./profile)as root this will allow any body who logs in to type ovw & without the./ and without being the directory of ovw to execute?
 
The file is /etc/profile.

Add this to /etc/profile:

PATH=/opt/ov/bin:
export $PATH

This assumes there is no PATH statement before you type this.

Yes, anything that is in /etc/profile will affect everyone who logs in.

Take a look at the /etc/profile file and you will see it has a line in it that says: "#The profile that all logins get before using their own .profile."

 
how about adding a link in /usr/bin or /usr/local/bin

ln -s /opt/ov/bin/ovw /usr/bin/ovw

then you won't have and extra path that is searched for each and every command that is not found earlier in the path.
 
Thanks that definitely works. Thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top