Solved

pico not found

Posted on 2000-03-06
4
498 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
  • 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 20 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now