Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am about to upgrade from Samba 2.2.7 to 3.0.20 on RH7.3 (yes I know RH7.3 is very much out of date but this is to fix a bug until I can rebuild the server with a current Linux distro)
I have compiled Samba 3.0.20 on a test machine running RH7.3 and it appeared to install without a hitch.
Now I have a little linux knowledge but I only really play with it when I have to, luckily Linux runs pretty much trouble free so I havent had to play with it too much!
To install the new version of Samba I need to uninstall the old version first - the old version wasnt installed using rpm so rpm -e will not work.
So how do I manually uninstall the old version? This I have not done before.
Take ur chance and install everything... from RPM, most probably the 3.0.20 will not get installed on 7.3, because the kerberos, ldap libraries required are recent ones. So you can try but I am sure you will have problems there.
What I can advise is... try to download the lates..
1) GCC
2) openldap
2) Berkley DB
3) Samba Source Code
(maybe some more, like openssh, Cyrus SASL, binutils, many more infact)
Build them and install, even this would be quite problematic but achievable. By RPM it would be be very harrowing dependecy issues..
samba can be kind of tricky because of all it's parts (stop it first)
if you know how you did it originally and you have original build dir you can rerun make install and follow the output and any other commands you used to find all it's parts
basically you got a bunch of /bin stuff that starts with smb
do
which smbclient
and the two main deamons themselves that are most likely in a root only place like
/usr/sbin
as root do
which smbd
swat will be there as well
you have libs in /usr/lib/samba and other junk so revove that whole think libsambaclient might have been moved somewhere like /usr/lib and there is a link in
/usr/lib/samba
and one header file /usr/include/libsmbclient.h
and some security libs
libnss_win{s,bind}.so
pam_winbind.so
i think like the cache and log directories and stuff should be ok to reuse
just use the same prefix variables you used the last time
I have already compiled the 3.0.20 source code on a RH7.3 test machine and it appeared to compile and install ok?
The problem is I didnt originally install samba on this production machine, so I have no idea how it was installed.
Can I try 'make uninstall', I believe to do this I need the original makefile? Which I havent been able to find, I think the last admin cleaned up pretty well after himself
What is likely to happen if I dont manage to get rid of all the files from the current Samba install, is likely to cause any problems for the new install or will just clutter up the system a little?
"The problem is I didnt originally install samba on this production machine, so I have no idea how it was installed."
You can check to see if it was installed using rpm with this command:
rpm -qa | sort | less
That will give you a list of every package that was installed using rpm. Then you can check an individual package's version number, install date, etc. with:
Yeah I have tried rpm -qa and it returned no results for samba so I assume it was not installed using rpm, hence I'm trying to find out how to uninstall without rpm?
If you have already built 3.0.20 successfully its good please post a howto here, because I want able to do it in RH8 funny!
anyway, Now that you want to uninstall the older samba which is installed without RPM check this out...
just check with
#>whereis smbd
Now that you know where it is delete it
similarly you do
#>whereis nmbd
and delete it
and for smbclient, smbstatus and all others do the same thing...
if they are in /usr/sbin then you can avoid deleating it, and better re-build 3.0.20 with the following options...
./configure --prefix=/usr --sysconfdir-/etc ....
and do a make install
I think you should get the latest samba in your paths..
Originally posted by saneax If you have already built 3.0.20 successfully its good please post a howto here, because I want able to do it in RH8 funny!
Well, being a newbie I did not know what to expect and it went very smoothly so I hope I got it right! This is what I did so let me know if if any of this is wrong:
Firstly I untarred the source package into a /root/tmp directory
# tar tvf samba-3.0.20.tar.gz
I then ran configure in that directory. It ran for a long while but didnt come up with any errors (a couple of warnings but it carried on).
I than ran 'make', it completed ok then 'make install'. It appeared to install ok and I could then start and stop the smbd and nmbd daemons without a problem. I could not test the network connectivity using the samba install because I do not have a client server arrangement set-up for this test machine. So I just put a very basic smb.conf file in and tested if the server would start and stop. I figure from here the install should be ok and it will just be config settings that will be causing any problems?
Thanks for the uninstall info, I will be coming in this weekend to have a go (after I have imaged the drive so I have a full backup to recover from in the event I wreck something!)
After reading the "How To Compile Samba" section of the online Samba guide, I decided not to uninstall the old version as apparently the new install will simply rename the old binaries with ".old" extension so its as easy as typing [root# make revert] to revert back to the old installation.
I stopped the smbd and nmbd daemons and then did make install with the newly compiled 3.0.20 source. It installed fine, no errors. I rebooted (Windows habit!), held my breath as I saw smb and nmb start with a big green OK
The first thing I did was try and connect to SWAT from a client PC and see what happened. Well I noticed the interface for SWAT was slightly different so something upgraded, but when I go to the status page, it still reads as version 2.2.7a?
I havent had time to fully investigate but so far it appears to be working fine. But why does it show as 2.2.7a, did the install not work properly because I didnt uninstall the old files or is it just displaying incorrectly through SWAT?
I hear that if you install from source, the following command
Code:
make uninstall
issued from the source tree of course, may possibly clean out an old version.
I also hear it depends on the Makefile for that particular source, some of them probably don't have that built in, but Samba is a pretty huge and famous app, like..., I mean it's got to allow it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.