LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   compiling samba (https://www.linuxquestions.org/questions/linux-newbie-8/compiling-samba-4175480374/)

project.linux.proj 10-11-2013 12:18 AM

compiling samba
 
when i compile samba on Ubuntu 12.04.3 LTS. The samba version samba-samba-2.2.12 it doesn't create samba service i.e /etc/init.d/smb or /etc/init.d/samba service. I followed steps mentioned in below url.

http://lofidellity.wordpress.com/201...n-ubuntu-8-04/

I can install the latest version using apt-get install samba. but for some reason i need lower version.

2nd problem that i m getting when i try to install the samba 3.x . i get the error for not library file i.e ldap.h. when i try to install this library with below command i get an error. command and error are also mentioned below.

# apt-get install libldap2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libldap-2.4-2 libldap-2.4-2:i386
The following NEW packages will be installed:
libldap2-dev
The following packages will be upgraded:
libldap-2.4-2 libldap-2.4-2:i386
2 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
1 not fully installed or removed.
Need to get 0 B/863 kB of archives.
After this operation, 1,393 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16065 package 'abcmagt':
missing maintainer
dpkg: error: parsing file '/var/lib/dpkg/status' near line 22821 package 'abagntux':
duplicate value for `Package' field
E: Sub-process /usr/bin/dpkg returned an error code (2)

evo2 10-11-2013 12:27 AM

Hi,
Quote:

Originally Posted by project.linux.proj (Post 5043773)
when i compile samba on Ubuntu 12.04.3 LTS. The samba version samba-samba-2.2.12 it doesn't create samba service i.e /etc/init.d/smb or /etc/init.d/samba service.

Do you have a question releated to this?

Quote:

I can install the latest version using apt-get install samba. but for some reason i need lower version.
Care to explain the reason?

Quote:

2nd problem that i m getting when i try to install the samba 3.x . i get the error for not library file i.e ldap.h. when i try to install this library with below command i get an error. command and error are also mentioned below.

# apt-get install libldap2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libldap-2.4-2 libldap-2.4-2:i386
The following NEW packages will be installed:
libldap2-dev
The following packages will be upgraded:
libldap-2.4-2 libldap-2.4-2:i386
2 upgraded, 1 newly installed, 0 to remove and 23 not upgraded.
1 not fully installed or removed.
Need to get 0 B/863 kB of archives.
After this operation, 1,393 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16065 package 'abcmagt':
missing maintainer
dpkg: error: parsing file '/var/lib/dpkg/status' near line 22821 package 'abagntux':
duplicate value for `Package' field
E: Sub-process /usr/bin/dpkg returned an error code (2)
Either manually fix your /var/lib/dpkg/status (be sure to make a backup) or revert to your /var/lib/dpkg/status-old. Do you know what this "abagntux" is? It seems to be very badly packaged. If you don't need it I recommend uninstalling it.

Evo2.

project.linux.proj 10-11-2013 12:49 AM

I am a new bie in ubuntu. my motive is to install the lower version of samba pkgs successfully. Yes it is a problem that i am not getting /etc/init.d/smbd in a standared path.

You meant to say. abagntux is a package . I am not able to list the pkgs.

# dpkg --list | grep abcmagt
#

Plz guide me next step

evo2 10-11-2013 01:00 AM

Hi,
Quote:

Originally Posted by project.linux.proj (Post 5043786)
I am not new bie in ubuntu.

Ok.

Quote:

my motive is to install the lower version of samba pkgs successfully.
Have you considered getting a corresponding source deb package and building from that?

Quote:

Yes it is a problem that i am not getting /etc/init.d/smbd in a standared path.
That is because upstream samba does not provide them. If you insist on installing from upstream source, you can write your own based on those in found in the Ubuntu packages.

Quote:

You meant to say. abagntux is a package . I am not able to list the pkgs.

# dpkg --list | grep abcmagt
#
Did you read the error messages? Here they are as you posted them.
Quote:

dpkg: warning: parsing file '/var/lib/dpkg/status' near line 16065 package 'abcmagt':
missing maintainer
dpkg: error: parsing file '/var/lib/dpkg/status' near line 22821 package 'abagntux':
duplicate value for `Package' field
Two packages with problem entries.
Quote:

Plz guide me next step
Fix your status file as I suggested in my previous post.

Evo2.

project.linux.proj 10-11-2013 01:25 AM

Thanks Evo. As you guided me the steps. I took the backup and cleaned those lines for both packages and i installed pkg happily.

# dpkg --list | grep libldap2-dev
ii libldap2-dev 2.4.28-1.1ubuntu4.4 OpenLDAP development libraries


Now i want to install the samba version samba-2.2.12 . Can i go ahead. I want to use /etc/samba as a configuration directory . service smbd should be in /etc/init.d.
Can i use the below command for the same .


./configure --cache-file=./config.cache \
--with-fhs \
--enable-shared \
--enable-static \
--disable-pie \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/etc/samba \
--with-privatedir=/etc/samba \
--with-piddir=/var/run/samba \
--localstatedir=/var \
--with-rootsbindir=/sbin \
--with-pammodulesdir=/lib/security \
--with-pam \
--with-syslog \
--with-utmp \
--with-readline \
--with-pam_smbpass \
--with-libsmbclient \
--with-winbind \
--with-shared-modules=idmap_rid,idmap_ad \
--with-automount \
--with-ldap \
--with-ads \
--with-dnsupdate \
--with-cifsmount \
--with-acl-support \
--with-quotas
Next you’ll want to compile the package

evo2 10-11-2013 01:45 AM

Hi,
Quote:

Originally Posted by project.linux.proj (Post 5043804)
Now i want to install the samba version samba-2.2.12 . Can i go ahead. I want to use /etc/samba as a configuration directory .

That is likely the default, but you should read the documentation to be sure.
Quote:

service smbd should be in /etc/init.d.
As I wrote earlier, upstream samba is unlikely to provide this. You'll have to do it yourself.

Quote:

Can i use the below command for the same .


./configure --cache-file=./config.cache \
--with-fhs \
--enable-shared \
--enable-static \
--disable-pie \
--prefix=/usr \
--sysconfdir=/etc \
--libdir=/etc/samba \
--with-privatedir=/etc/samba \
--with-piddir=/var/run/samba \
--localstatedir=/var \
--with-rootsbindir=/sbin \
--with-pammodulesdir=/lib/security \
--with-pam \
--with-syslog \
--with-utmp \
--with-readline \
--with-pam_smbpass \
--with-libsmbclient \
--with-winbind \
--with-shared-modules=idmap_rid,idmap_ad \
--with-automount \
--with-ldap \
--with-ads \
--with-dnsupdate \
--with-cifsmount \
--with-acl-support \
--with-quotas
Next you’ll want to compile the package
Setting libdir to /etc/samba seems a little strange. Anyway, please read the documentation that comes with the source. Additionally, since you are compiling this by hand the prefix should probably be /usr/local/, although personally I'd be using stow. Actually, I wouldn't be installing an ancient unmaintained version of samba at all.

Evo2.


All times are GMT -5. The time now is 02:59 AM.