Samba

From CBLFS
Revision as of 09:17, 2 October 2006 by Jciccone (talk | contribs)
Jump to navigationJump to search
Download Source: ftp://us1.samba.org/pub/samba/stable/samba-3.0.23c.tar.gz

Dependencies

Optional

Optional (For the passdb libraries)

Configuration Information

To build Samba against Linux-Pam pass the following to configure:

--with-pam

To build Samba against Python pass the following to configure:

--with-python

Non-Multilib

Compile the package:

cd source &&
./configure --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var --with-piddir=/var/run \
    --with-fhs --with-smbmount &&
make

Install the package

make install &&
mv -v /usr/lib/samba/libsmbclient.so /usr/lib &&
ln -v -sf ../libsmbclient.so /usr/lib/samba &&
ln -v -sf libsmbclient.so /usr/lib/libsmbclient.so.0 &&

chmod -v 644 /usr/include/lib{smbclient,msrpc}.h &&

install -v -m755 nsswitch/libnss_win{s,bind}.so /lib &&
ln -v -sf libnss_winbind.so /lib/libnss_winbind.so.2 &&
ln -v -sf libnss_wins.so /lib/libnss_wins.so.2 &&

if [ -f nsswitch/pam_winbind.so ]; then
    install -v -m755 nsswitch/pam_winbind.so /lib/security
fi &&

install -v -m644 ../examples/smb.conf.default /etc/samba &&

install -v -m755 -d /usr/share/doc/samba-3.0.23c &&
install -v -m644 ../docs/*.pdf /usr/share/doc/samba-3.0.23c &&
ln -v -s ../../samba/swat  /usr/share/doc/samba-3.0.23c

If you passed --with-python to the configure script issue the following command to install the Python extensions:

make python_install

Multilib

32Bit

Compile the package:

export USE_ARCH=32 &&
cd source &&
CC="gcc ${BUILD32}" ./configure --prefix=/usr --sysconfdir=/etc \
    --localstatedir=/var --with-piddir=/var/run \
    --with-fhs --with-smbmount &&
make

Install the package

make install &&
mv -v /usr/lib/samba/libsmbclient.so /usr/lib &&
ln -v -sf ../libsmbclient.so /usr/lib/samba &&
ln -v -sf libsmbclient.so /usr/lib/libsmbclient.so.0 &&

chmod -v 644 /usr/include/lib{smbclient,msrpc}.h &&

install -v -m755 nsswitch/libnss_win{s,bind}.so /lib &&
ln -v -sf libnss_winbind.so /lib/libnss_winbind.so.2 &&
ln -v -sf libnss_wins.so /lib/libnss_wins.so.2 &&

if [ -f nsswitch/pam_winbind.so ]; then
    install -v -m755 nsswitch/pam_winbind.so /lib/security
fi

If you passed --with-python to the configure script issue the following command to install the Python extensions:

make python_install

Clean up the enviornment:

unset USE_ARCH

N32

Compile the package:

export USE_ARCH=n32 &&
cd source &&
CC="gcc ${BUILDN32}" ./configure --prefix=/usr --sysconfdir=/etc \
    --libdir=/usr/lib32 --localstatedir=/var --with-piddir=/var/run \
    --with-fhs --with-smbmount &&
make

Install the package

make install &&
mv -v /usr/lib32/samba/libsmbclient.so /usr/lib32 &&
ln -v -sf ../libsmbclient.so /usr/lib32/samba &&
ln -v -sf libsmbclient.so /usr/lib32/libsmbclient.so.0 &&

chmod -v 644 /usr/include/lib32{smbclient,msrpc}.h &&

install -v -m755 nsswitch/libnss_win{s,bind}.so /lib32 &&
ln -v -sf libnss_winbind.so /lib32/libnss_winbind.so.2 &&
ln -v -sf libnss_wins.so /lib32/libnss_wins.so.2 &&

if [ -f nsswitch/pam_winbind.so ]; then
    install -v -m755 nsswitch/pam_winbind.so /lib32/security
fi

If you passed --with-python to the configure script issue the following command to install the Python extensions:

make python_install

Clean up the enviornment:

unset USE_ARCH

64Bit

Compile the package:

export USE_ARCH=64 &&
cd source &&
CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \
    --libdir=/usr/lib64 --localstatedir=/var --with-piddir=/var/run \
    --with-fhs --with-smbmount &&
make

Install the package

make install &&
mv -v /usr/lib64/samba/libsmbclient.so /usr/lib64 &&
ln -v -sf ../libsmbclient.so /usr/lib64/samba &&
ln -v -sf libsmbclient.so /usr/lib64/libsmbclient.so.0 &&

chmod -v 644 /usr/include/lib64{smbclient,msrpc}.h &&

install -v -m755 nsswitch/libnss_win{s,bind}.so /lib64 &&
ln -v -sf libnss_winbind.so /lib64/libnss_winbind.so.2 &&
ln -v -sf libnss_wins.so /lib64/libnss_wins.so.2 &&

if [ -f nsswitch/pam_winbind.so ]; then
    install -v -m755 nsswitch/pam_winbind.so /lib64/security
fi &&

install -v -m644 ../examples/smb.conf.default /etc/samba &&

install -v -m755 -d /usr/share/doc/samba-3.0.23c &&
install -v -m644 ../docs/*.pdf /usr/share/doc/samba-3.0.23c &&
ln -v -s ../../samba/swat  /usr/share/doc/samba-3.0.23c

If you passed --with-python to the configure script issue the following command to install the Python extensions:

make python_install

Clean up the enviornment:

unset USE_ARCH

Configuring

Mounting Shares by Unprivileged Users

For an unprivileged user to run smbmount and smbumount the comands must my setuid root:

chmod -v 4755 /usr/bin/smb{mnt,umount}
Retrieved from "?title=Samba&oldid=2355"