I ran into trouble with the Samba package on my ubuntu 14.04.3. I had the requirement of mapping root (/) folder on the network without concern of the security for my own internal purpose. However, earlier it use to run fine but in the latest Ubuntu it altogether stop responding and throw the error “Invalid handle” in my Windows PC.

So, finally I decided to compile latest version of Samba on ubuntu and check if the issue is resolved. Thankfully, issue got resolved and I was again back to my normal life :).

Please note: It is highly recommended  not to map root (/) folder on the network until and unless you really know what you are doing.

Step for compiling and setting up Samba for Ubuntu 14.04.3

  1. Download the latest source code from http://www.samba.org
  2. Extract it into some temporary folder like /root/temp/samba
  3. Install the following packages
  4. apt-get install build-essential libboost-dev python-dev libgnutls-dev libacl1-dev libldap2-dev
  5. Run ./configure in the source folder
  6. Run make
  7. Run make install
  8. Finally, all the files will be installed on the following location by default /usr/local/samba
  9. Copy all the files in /usr/local/samba/bin -> /usr/bin
  10. You will need to stop the following services before copying the files in/usr/sbin nmbd, smbd & winbind
  11. Run sudo service nmbd stop
  12. Run sudo service smbd stop
  13. Run sudo service winbind stop
  14. Copy all the files in /usr/local/samba/sbin -> /usr/sbin
  15. Finally, create the link to your old configuration file execute ” ln /etc/samba/smb.conf /usr/local/samba/etc/smb.conf “
  16. Restart the server

That’s all you will be able to see the latest samba version running on your server and hopefully with all the bugs removed.

Compile latest Samba after Issue in Ubuntu 14.04.3

3 thoughts on “Compile latest Samba after Issue in Ubuntu 14.04.3

  • February 11, 2016 at 2:52 am
    Permalink

    Clear as mud. Can you please explain in detail? Things like “Finally, create the link to your old configuration file” might as well say “Do better” for all that tells me.

    Reply
  • October 31, 2016 at 12:04 pm
    Permalink

    This helped a ton. Thanks.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.