[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

pico not found

Posted on 2000-03-06
4
Medium Priority
?
531 Views
Last Modified: 2013-12-16
I have installed pine on a Solaris 2.6 server in /opt/UWpine. I have set the /etc/profile to include the following

PATH=$PATH:/opt/netscape:/opt/UWpine/bin:.;export PATH

Now, when I telnet to the machine and try to run pico, which is in /opt/UWpine/bin it tells me "pico not found" but when I'm actually on the machine, pico runs just fine. I am logged on as root in both instances.

Any ideas?
0
Comment
Question by:strausy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 2588761
Are you sure you put the PATH statement in the right place in /etc/profile (not inside a conditional)? Are you actually logging in remotely as root or as some other user and "su"ing to root (that user's .profile might be resetting PATH)?
0
 
LVL 3

Expert Comment

by:freesource
ID: 2588763
Check to see what your path is when you telnet in as root with "echo $PATH", I think you will discover what the problem is.  Try putting the path in $HOME/.bash_profile .
0
 
LVL 1

Author Comment

by:strausy
ID: 2588916
I'm logging on as myself, then su root - ing.

I thought /etc/profile was the "global profile."

When I just su root, the path to /opt/UWpine/bin is not present, however if I su - root (with a dash) it is present and works.

So I guess I'm putting this in the wrong place? I logged onto another solaris box and I can use pico with any user and there is nothing in /etc/profile.  

I'm a bit unfamiliar with Unix, what/where exactly would $HOME/.bash_profile be?
0
 
LVL 40

Accepted Solution

by:
jlevie earned 60 total points
ID: 2588966
The "su -" differs from "su" in that the user's shell init scripts (/etc/profile in this case) are read if you "su -".

What you most likely want to do is to create the appropriate shell init files in your (and/or) root's home dir. The names vary depending on what shell you use:

sh, ksh: .profile
csh:     .login, .cshrc .logout
tcsh:    .login, .tcshrc
bash:    .bash_profile, .bashrc

It's usually a good idea to leave the system's init files /etc/profile & /etc/.login as generic as possible, only placing definitions there that are applicable to all users on the system. Further customization is best done in a user's init file.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question