Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Removing Samba

Posted on 2005-03-25
Medium Priority
Last Modified: 2013-12-16
I have a web server that is running samba 2.0.9. I have tried to install newer versions. They all compile and install okay but when I check the version to make sure it installed it still states 2.0.9. I would like to remove samba and reinstall. Hopefully this will allow me to update version. Can some one tell me how to remove samba. Or what file to delete. Thanks.
Question by:jhawk3
LVL 15

Expert Comment

ID: 13632564
You don't say which Linux distro you are using. That would help.

But you can look in /etc/init.d/smb It will show you how samba gets started
Those are the files you need to update/change.
LVL 38

Accepted Solution

wesly_chen earned 2000 total points
ID: 13633081
> remove samba and reinstall
As root,
for SuSE, use YasT to remove Samba,
for Fedora Core 2 or 3, use "system-config-package" to remove Samba (Windows File Server)
for RedHat or Fedora 1, use "redhat-config-package" to remove Samba (Windows File Server).

Or for all the RPM base Linux distribution, use
rpm -e `rpm -qa | grep -i samba`
to remove Samba.

If you compile from the source code, the newer version is usually install in /usr/local/bin/smbd.
So, as veedar suggested, you need to edit /etc/init.d/smb to reflect the path of newer version.


Author Comment

ID: 13633362
The distro is on a Cobalt Qube 3 web server. It list as Cobalt Linux. I was install by source. I tried to upgrade to ver 3 of samba and it look like it went okay but still list version 2. What files should I redirect?
LVL 38

Expert Comment

ID: 13633480
Cobalt Qube 3 is a special box for email/DNS/DHCP/FTP/Web/SAMBA server.
Most of the configuration/administration jobs use web interface. So it is better upgrade through BlueLink (?) instead of
compiling from the source code, otherwise, you miht break a lot of thing, specially the administration web interface links.

> upgrade to ver 3 of samba and it look like it went okay but still list version 2.
check which smbd you are running.
which smbd
smbd -V  # Check the version

I suspect you are still running samba 2 since you just install another version to different path.


LVL 12

Expert Comment

ID: 13639354
When you compile anything, like Samba, if you haven't simply removed the previous version with either pkgtool or something similar, you're symlinks and path remain unless you have set the proper environment variables during configure, make, and install.

Which means, the OS continues to revert to the officially installed package, the original.

Most recent programs are no longer installing control to /etc rather to /usr/local/Samba/etc and the like.

So your OS is still accessing the old path.

You've got more than one problem because even running smbd from /etc is not going to run the new Samba.

Unfortunately, there is no quick fix currently.  Editing configure and the environment is only valid if the previous Samba is removed and you set the proper paths:

Example: Typical configure from MySQL5.0.2 -  a one meg configure script:


My writeups on this problem are here:


and here:


Basically, you want to use the export command properly from within configure; something not always so easy to do.

You can see above that if the prefix "/usr" is used, then the executables to to "/usr/etc" instead of to "/etc" and therein lies the problem.

What I have proposed is to replace a "per configure script" string of definiions with a selectible LAYOUT option similar to what Apache uses, but using files instead of script configures to set the paths, etc..

You must remember that if you try to compile and then install Samba, or any other program, while it is running or without removing and cleaning first, there is the possibility that the new installation will break the old and result in both being broken.

You have to "redirect" all files, but you have to first remove the first Samba package.  I am not aware that you can "update" any program and this is because most don't allow the symlinks to be installed automatically.  So the catch-22 is that you may lose all your users in the Samba config, unless somehow you figure out how to keep a copy and replace it for the new version.

Find your install directories from the general Apache layout file.  Apache seems to have been the only developer on top of this, I can't find any others who have given enough attention to this problem.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Fine Tune your automatic Updates for Ubuntu / Debian
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month10 days, 14 hours left to enroll

571 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