LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-16-2002, 12:14 PM   #1
needamiracle
Member
 
Registered: Apr 2002
Location: North Attleboro, MA
Distribution: RH 7.3
Posts: 106

Rep: Reputation: 15
RPM vs. Compiling


Hi All,

I have some simple questions. First, why do RPM packages install software in different locations than when I compile and build the software? I prefer building software to RPMing because of the amount of control, however RPMs seem to be the way to go because of startup scripts etc... So here is my problem...

I have RH 7.3. It comes with openssh-3.1p1. This version has a well known bug in it, so I go and get the latest 3.4p1 the day after the alert was issued. However, this has to be compiled and built which is fine. I did not do an rpm -e for openssh-3.1p1 and built the latest version of openssh and just installed it in /usr/local/src. I do an rpm-q openssh and I get the openssh-3.1p1 but when I do ssh -V I get ...3.4p1. Am I going to run into problems by doing this? What version is starting up? and how do I check? I'm now at the point at which I would rather build the software than RPM it, because of the flexibility I have in the build process, so it brings me back to my original question...if RPM is the way to go from now on, why doesn't it follow the conventional paths created when I build it? In either case whether I build or RPM I would like that the results be the same either way. What is the best process for removing RPMs and installing from source? How far behind is the RPM release from a source release. Has anyone else had these types of issues?

Thanks in advance, this is a confusing issue that I would love to have straightened out. I took the RH 131 Systems Admin Course but stuff like this wasn't covered, I wish I knew then what I knew now...

Thanks again,
needamiracle
 
Old 07-16-2002, 01:04 PM   #2
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
k, the version of sshd that's running is most likely 3.4p1, and here's my reasoning for thinking so:

you overwrote the binaries of openssh and NOT openssl

If you really want to check, just type: telnet 127.0.0.1 22 and see what version of sshd is running.

I suggest doing this:

rpm -e openssh-3.1p1
rpm -e openssl-3.1p1 (or whatever the openssl versions are)

then get the sources, recompile and then edit the startup scripts in /etc/rc.d/init.d


well, hope this helps
Aaron
 
Old 07-16-2002, 01:06 PM   #3
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
PS:

In the SPEC file for the RPM, during the build process, RedHat decided to put things in different directories so that they could make things work for them. I think that's poo. They should have just left ./configure and make install alone
 
Old 07-16-2002, 02:35 PM   #4
needamiracle
Member
 
Registered: Apr 2002
Location: North Attleboro, MA
Distribution: RH 7.3
Posts: 106

Original Poster
Rep: Reputation: 15
Thanks Aaron,

I did do telnet 127.0.0.1 22 and received openssh-3.1p1...i am going to remove it and reinstall from source.
 
Old 07-16-2002, 04:47 PM   #5
needamiracle
Member
 
Registered: Apr 2002
Location: North Attleboro, MA
Distribution: RH 7.3
Posts: 106

Original Poster
Rep: Reputation: 15
SSH

Ok...I've uninstalled the RPM packages for both openssl and openssh. I have reinstalled from source the latest openssl and openssh. I have copied the sshd startup script from another RH machine (/etc/rc.d/init.d/sshd) and did a chkconfig --add sshd, chkconfig --levels 345 sshd on chkconfig --levels 126 sshd off. Everything seems ok, until I issue a service sshd restart... it shuts down the daemon ok, but fails to restart it. I get this error... Starting sshd:execvp: No such file or directory. Also upon installation, I get "No privilege user sshd". Are these two related?

Thanks
 
Old 07-16-2002, 05:00 PM   #6
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
I dunno...I can help you out with the first one though.

Redhat got this wonderful idea that /usr/local/* wouldn't be needed. So, they just ignored the STANDARDS for filesystem structure and proceeded to place everything in /usr/bin and /usr/sbin.

Problem: Developers use the standards.

if you look in /usr/local/sbin and /usr/local/bin you'll find all of your ssh stuff (perhaps other packages too that "disappeared"). If you want, what you can do is either make a symbolic link with permissions 4755 in /usr/bin and /usr/sbin pointing to /usr/local/bin/sshd or /usr/local/sbin/sshd (I forget where it is) or you can go through all of the init levels and find the hardcoded value and change it.

You'll run into this problem a lot under redhat/mandrake systems unless you tweak the init scripts to use `which <commandname>` instead of "/usr/bin/<commandname>" or "<commandname>"

Aaron
 
Old 07-16-2002, 05:02 PM   #7
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
hrrm..actually I think the nopriv error could be from your sshd binary being non-suid. try it with permissions 4755...just to try it out.
 
Old 07-16-2002, 06:14 PM   #8
needamiracle
Member
 
Registered: Apr 2002
Location: North Attleboro, MA
Distribution: RH 7.3
Posts: 106

Original Poster
Rep: Reputation: 15
Privilige seperation user sshd does not exist...

Well, I got sshd to start and stop with a faux sshd user, but when i tried to log in from another machine I was unable to. I fixed the start location (I had to edit one script in init.d to point to the correct location). What is a privilege seperation user and how do I add it?

Thanks
 
Old 07-17-2002, 08:30 AM   #9
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
you don't need a privilege seperation user. make sure that you
chmod 755 `which sshd`
then
chown root.root `which sshd`

it should just work. you did do make install as root right?
 
Old 07-17-2002, 04:30 PM   #10
needamiracle
Member
 
Registered: Apr 2002
Location: North Attleboro, MA
Distribution: RH 7.3
Posts: 106

Original Poster
Rep: Reputation: 15
I have installed sshd as root, I can get the server to start up, but I cannot log in from another machine. I get this error...Permission denied (publickey,password,keyboard-interactive). I have identical user accounts on both machines.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling OpenOffice 2 require the rpm tool? Seph64 Linux From Scratch 4 11-07-2005 10:22 AM
Help with compiling/building RPM leisure Linux - Software 2 05-08-2005 11:18 PM
RPM vs compiling from Source Code ceci2 Linux - Enterprise 4 03-15-2005 03:58 PM
Any benifit of compiling the code over rpm? ziggie216 Linux - Software 3 03-12-2004 12:53 PM
.src.rpm, .i386.rpm and .i686.rpm hhegab Linux - Software 2 06-19-2003 07:19 AM


All times are GMT -5. The time now is 06:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration