Solved

Not able to connect to CVS installed in solaris 10 using WinCvs

Posted on 2010-08-20
16
820 Views
Last Modified: 2013-12-21
Hi,
I installed CVS (cvs-1.11.23-sol8-sparc-local.gz)  on solaris 8 and it was working fine,
but when installed cvs (cvs-1.11.23-sol10-sparc-local.gz) in solaris 10 and I am trying to
connect or import using WinCVS, I am getting following error.
ksh: cvs:  not found

installation on solris 10 was successfull, didn't get any error/

The command it tries like this
cvs -d :ssh;username=xxx;password=xxx00001;hostname=host1:/opt/repository/CVSDEV import -I ! -I CVS -W "*.doc -k 'b'" -m "no message" -- "Old Docs" avendor arelease (in directory C:\Projects\COMN\COMN-RLI\Old Docs\)

Thanks,
Manosis
0
Comment
Question by:manosisk
  • 7
  • 6
16 Comments
 
LVL 22

Expert Comment

by:blu
ID: 33530789
It sounds like the directory that cvs is installed in on the Solaris system is not on the default path of the user you are using to access the service. If you log in to host one as the user and then once you are logged in, type just "cvs" by itself and hit return, does it find the command? What directory is cvs installed in, /usr/local/bin? What is the default path of the user?
0
 

Author Comment

by:manosisk
ID: 33532120
Hi,
    When I log in to solrais, it is able to find CVS command. Here is the sceenshot.
Last login: Mon Aug 16 13:55:27 2010 from il8645ac494891.
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

[acuxeaidz1] /export/home/wbiusr
wbiusr $ cvs
Usage: cvs [cvs-options] command [command-options-and-arguments]
  where cvs-options are -q, -n, etc.
    (specify --help-options for a list of options)
  where command is add, admin, etc.
    (specify --help-commands for a list of commands
     or --help-synonyms for a list of command synonyms)
  where command-options-and-arguments depend on the specific command
    (specify -H followed by a command name for command-specific help)
  Specify --help to receive this message

The Concurrent Versions System (CVS) is a tool for version control.
For CVS updates and additional information, see
    the CVS home page at http://cvs.nongnu.org/


Yes it is installed in /usr/local/bin
default user path : /export/home/wbiusr
0
 
LVL 22

Expert Comment

by:blu
ID: 33532354
By user path, I meant the PATH variable.

Try this. Log into the system as the user, and do these two commands and post the output:

which cvs
echo $PATH
0
 

Author Comment

by:manosisk
ID: 33533043
Here is the results.

login as: wbiusr
Password:
Last login: Thu Aug 26 09:21:33 2010 from il8645ac494891.
Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

[acuxeaidz1] /export/home/wbiusr
wbiusr $ cvs
Usage: cvs [cvs-options] command [command-options-and-arguments]
  where cvs-options are -q, -n, etc.
    (specify --help-options for a list of options)
  where command is add, admin, etc.
    (specify --help-commands for a list of commands
     or --help-synonyms for a list of command synonyms)
  where command-options-and-arguments depend on the specific command
    (specify -H followed by a command name for command-specific help)
  Specify --help to receive this message

The Concurrent Versions System (CVS) is a tool for version control.
For CVS updates and additional information, see
    the CVS home page at http://cvs.nongnu.org/

[acuxeaidz1] /export/home/wbiusr
wbiusr $ echo $PATH
/opt/IBM/ProcessServer/java/bin:/usr/java/bin:/usr/bin:/opt/VRTSvmsa/bin:/usr/lo
cal/bin:/usr/ucb:/usr/sbin:/usr/sfw/bin:/u001/oracle/home/product/10.2.0/bin:/us
r/lbin
0
 
LVL 22

Expert Comment

by:blu
ID: 33535481
Ok, I think I understand the problem. The problem is that ssh does not run your local .profile file, which is what sets up the PATH variable.

There are two ways to deal with this. One is to add /usr/local/bin to your default path, and the other is to add cvs to the existing path.

If you can use ssh from your client system to run a command, try just using ssh to run the command "env" on the server. This will display the actual environment the command will run in. Look particularly for the PATH
variable. Is /usr/local/bin on it?

The standard way to set up arbitrary environment variables using ssh is to create a file called "environment" in the .ssh directory. However, the ssh server must be configured to allow this. I haven't had much luck getting this to work.

The next way to get /usr/local/bin on the path is to add it to the user default path as set in /etc/profile. You
should be able to find where it is set in the file and add it. The how is not hard. The question is whether or not
you have permissions.

0
 

Author Comment

by:manosisk
ID: 33537303
I added PATH=/usr/local/bin:/usr/bin:/usr/sbin:/usr/local/sbin in /etc/profile. But still getting the same error.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 22

Expert Comment

by:blu
ID: 33537729
Ok, do this. Log into the server with ssh and run this command, but don't log out:

ptree $$

This will show the process tree. Right at the top, on the first line will be  a line that looks like this:

529   /usr/lib/ssh/sshd

but with a different process number. Remember that number.
Now su to root and run this program:

truss -o /tmp/ssh.truss -faled -p pid_from_sshd

where "pid_from_sshd" is the number from before. Immediately after that, on the client, run the program that fails. Wait until you get the error message and then ctrl-c the truss command.  You can try to determine the problem from the output file /tmp/sshd.truss or you can post it here and I will look at it.
0
 

Author Comment

by:manosisk
ID: 33542447
I did as you said. There is no /tmp/sshd.truss but it created /tmp/ssh.truss.
I am attaching that.
ssh.truss.txt
0
 
LVL 22

Expert Comment

by:blu
ID: 33544556
Ok, I see the problem. Do this:

If it is not already there, make a directory called /export/home/wbiuser/.ssh

Then in that directory, create a file called rc that contains this:

PATH=/usr/local/bin:$PATH
export PATH

Then se tthe permissions on this file to 555:

chmod ugo=rx /export/home/wbiuser/.ssh/rc

Then give it a try.
0
 

Author Comment

by:manosisk
ID: 33545554
Did, no luck. Same error.
0
 
LVL 22

Expert Comment

by:blu
ID: 33545841
I saw that sshd definitely looks for that file. It also looks for /usr/bin/cvs and only /usr/bin/cvs. At this point, the easy solution is probably to just make a symbolic link in /usr/bin/cvs to /usr/local/bin/cvs. IF you don't want to do that, then try doing the truss thing again with the rc file in place and I can look to see what is going wrong now.
0
 

Author Comment

by:manosisk
ID: 33546011
Hi,
     If you can find out the problem ,that will be great. Here is the ssh.truss file
ssh.truss.txt
0
 
LVL 22

Accepted Solution

by:
blu earned 500 total points
ID: 33559813
Ok, figured this out. Here is the deal. By default, ssh and sshd use exactly the PATH as set up by the default for the system. The shell can modify the PATH in its normal processing. The csh shell always processes ~/.cshrc for instance. However, the normal login processing is suppressed, so the .login and .profile files are not read.

It is possible to configure ssh and sshd to allow the user to set environment variables, either in a file called ~/.ssh/environment or in the authorized_keys files, but this is considered a security risk and is disabled by default. See the
man page sshd_config under PermitUserEnvironment.

Also, sshd will run the scripts /etc/ssh/sshrc and ~/.ssh/rc, but they are run in sub-shells and cannot affect the
PATH variable when the main command is run.

The system default PATH is /usr/bin, but it is settable in the /etc/default/login file.

So, the options are to either change the system default path in /etc/default/login file, switch to a shell that always
does some processing (csh and .cshrc) so that you can set the PATH, or move (or link) cvs to a directory that is
already on the default path.  (/usr/bin)

Those are the only options I can see. If you have any more questions, feel free to ask.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

911 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

19 Experts available now in Live!

Get 1:1 Help Now