Difference between revisions of "Samba"
m (Updated download url) |
|||
(48 intermediate revisions by 11 users not shown) | |||
Line 2: | Line 2: | ||
|- | |- | ||
!Download Source: | !Download Source: | ||
− | | | + | | http://www.samba.org/samba/ftp/old-versions/samba-{{Samba-Version}}.tar.gz |
|} | |} | ||
---- | ---- | ||
+ | |||
+ | {{Package-Introduction|The Samba package provides file and print services to SMB/CIFS clients and Windows networking to Linux clients. Samba can also be configured as a Windows NT 4.0 Domain Controller replacement (with caveats working with NT PDC's and BDC's), a file/print server acting as a member of a Windows NT 4.0 or Active Directory domain and a NetBIOS (rfc1001/1002) nameserver (which amongst other things provides LAN browsing support).|http://www.samba.org}} | ||
== Dependencies == | == Dependencies == | ||
Line 11: | Line 13: | ||
=== Optional === | === Optional === | ||
* [[popt]] | * [[popt]] | ||
− | * [[Linux- | + | * [[Linux-PAM]] |
* [[OpenLDAP]] | * [[OpenLDAP]] | ||
* [[CUPS]] | * [[CUPS]] | ||
− | * [[MIT | + | * [[MIT krb5]] or [[Heimdal]] |
− | |||
* [[Acl]] | * [[Acl]] | ||
+ | |||
=== Optional (For the passdb libraries) === | === Optional (For the passdb libraries) === | ||
* [[LibXML2]] | * [[LibXML2]] | ||
Line 24: | Line 26: | ||
== Configuration Information == | == Configuration Information == | ||
− | To build Samba against [[Linux- | + | To build Samba against [[Linux-PAM]] pass one of the following to configure: |
− | |||
− | |||
− | |||
− | |||
− | --with- | + | --with-pam --with-pammodulesdir=/lib/security |
+ | --with-pam --with-pammodulesdir=/lib32/security | ||
+ | --with-pam --with-pammodulesdir=/lib64/security | ||
== Non-Multilib == | == Non-Multilib == | ||
Line 36: | Line 36: | ||
Compile the package: | Compile the package: | ||
− | cd | + | cd source3 && |
./configure --prefix=/usr --sysconfdir=/etc \ | ./configure --prefix=/usr --sysconfdir=/etc \ | ||
− | --localstatedir=/var --with-piddir=/var/run | + | --libdir=/usr/lib --localstatedir=/var \ |
− | + | --with-piddir=/var/run --with-fhs --with-cifsmount && | |
make | make | ||
Install the package | Install the package | ||
− | make | + | make ROOTSBINDIR=/sbin install-everything && |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
install -v -m644 ../examples/smb.conf.default /etc/samba && | install -v -m644 ../examples/smb.conf.default /etc/samba && | ||
− | install -v -m755 -d /usr/share/doc/samba- | + | install -v -m755 -d /usr/share/doc/samba-{{Samba-Version}} && |
− | install -v -m644 ../docs/*.pdf /usr/share/doc/samba- | + | install -v -m644 ../docs/*.pdf /usr/share/doc/samba-{{Samba-Version}} && |
− | ln -v -s ../../samba/swat /usr/share/doc/samba- | + | ln -v -s ../../samba/swat /usr/share/doc/samba-{{Samba-Version}} |
− | |||
− | |||
− | |||
− | |||
== Multilib == | == Multilib == | ||
Line 76: | Line 59: | ||
export USE_ARCH=32 && | export USE_ARCH=32 && | ||
− | cd | + | cd source3 && |
CC="gcc ${BUILD32}" ./configure --prefix=/usr --sysconfdir=/etc \ | CC="gcc ${BUILD32}" ./configure --prefix=/usr --sysconfdir=/etc \ | ||
− | --localstatedir=/var --with-piddir=/var/run | + | --libdir=/usr/lib --localstatedir=/var \ |
− | + | --with-piddir=/var/run --with-fhs --with-cifsmount && | |
make | make | ||
Install the package | Install the package | ||
− | make | + | make ROOTSBINDIR=/sbin install-everything |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Clean up the enviornment: | Clean up the enviornment: | ||
Line 108: | Line 74: | ||
=== N32 === | === N32 === | ||
− | |||
Compile the package: | Compile the package: | ||
export USE_ARCH=n32 && | export USE_ARCH=n32 && | ||
− | cd | + | cd source3 && |
CC="gcc ${BUILDN32}" ./configure --prefix=/usr --sysconfdir=/etc \ | CC="gcc ${BUILDN32}" ./configure --prefix=/usr --sysconfdir=/etc \ | ||
− | --libdir=/usr/lib32 --localstatedir=/var --with-piddir=/var/run | + | --libdir=/usr/lib32 --localstatedir=/var \ |
− | + | --with-piddir=/var/run --with-fhs --with-cifsmount && | |
make | make | ||
Install the package | Install the package | ||
− | make | + | make ROOTSBINDIR=/sbin install-everything |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Clean up the enviornment: | Clean up the enviornment: | ||
Line 145: | Line 93: | ||
=== 64Bit === | === 64Bit === | ||
− | |||
Compile the package: | Compile the package: | ||
export USE_ARCH=64 && | export USE_ARCH=64 && | ||
− | cd | + | cd source3 && |
CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \ | CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \ | ||
− | --libdir=/usr/lib64 --localstatedir=/var --with-piddir=/var/run | + | --libdir=/usr/lib64 --localstatedir=/var \ |
− | + | --with-piddir=/var/run --with-fhs --with-cifsmount && | |
make | make | ||
Install the package | Install the package | ||
− | make install | + | make ROOTSBINDIR=/sbin install-everything && |
− | |||
− | |||
− | |||
− | + | install -v -m644 ../examples/smb.conf.default /etc/samba && | |
− | install -v -m755 | + | install -v -m755 -d /usr/share/doc/samba-{{Samba-Version}} && |
− | + | install -v -m644 ../docs/*.pdf /usr/share/doc/samba-{{Samba-Version}} && | |
− | ln -v - | + | ln -v -s ../../samba/swat /usr/share/doc/samba-{{Samba-Version}} |
+ | |||
+ | Clean up the enviornment: | ||
+ | |||
+ | unset USE_ARCH | ||
+ | |||
+ | == Configuring == | ||
+ | |||
+ | === Bootscript === | ||
+ | |||
+ | Install the init script for samba included in the [[bootscripts]] package: | ||
+ | |||
+ | make install-samba | ||
+ | |||
+ | Install the init script for winbind included in the [[bootscripts]] package: | ||
+ | |||
+ | make install-winbind | ||
+ | |||
+ | === Creating /etc/samba/smb.conf === | ||
+ | |||
+ | == Client Only == | ||
+ | |||
+ | Create a basic configuration file: | ||
+ | cat > /etc/samba/smb.conf << "EOF" | ||
+ | [global] | ||
+ | workgroup = MYGROUP | ||
+ | dos charset = cp850 | ||
+ | unix charset = ISO-8859-1 | ||
+ | EOF | ||
+ | |||
+ | == Client + Server Support == | ||
+ | |||
+ | Add user NoBody for the server to run under. This is not needed of only using the client side, or if user/group NoBody already exist | ||
+ | |||
+ | groupadd -g 65534 nobody && | ||
+ | useradd -c "Nobody" -d /dev/null \ | ||
+ | -u 65534 -g nobody -s /bin/false nobody | ||
+ | |||
+ | Create a share for each user's home directory, and share all printers to Windows machines: | ||
+ | |||
+ | cat > /etc/samba/smb.conf << "EOF" | ||
− | + | [global] | |
− | + | workgroup = MYGROUP | |
− | + | dos charset = cp850 | |
+ | unix charset = ISO-8859-1 | ||
− | + | [homes] | |
+ | comment = Home Directories | ||
+ | browseable = no | ||
+ | writable = yes | ||
− | + | [printers] | |
− | + | comment = All Printers | |
− | + | path = /var/spool/samba | |
+ | browseable = no | ||
+ | guest ok = no | ||
+ | printable = yes | ||
+ | EOF | ||
− | + | At this point, you will most likely want to install [[SWAT]] (Samba Web Administration Tool) to manage /etc/samba/smb.conf from a web browser. | |
− | + | == Adding Samba Users == | |
− | + | smbpasswd -a | |
− | + | [[Category:Servers]] |
Latest revision as of 14:07, 24 January 2011
Download Source: | http://www.samba.org/samba/ftp/old-versions/samba-3.5.6.tar.gz |
---|
Contents
Introduction to Samba
The Samba package provides file and print services to SMB/CIFS clients and Windows networking to Linux clients. Samba can also be configured as a Windows NT 4.0 Domain Controller replacement (with caveats working with NT PDC's and BDC's), a file/print server acting as a member of a Windows NT 4.0 or Active Directory domain and a NetBIOS (rfc1001/1002) nameserver (which amongst other things provides LAN browsing support).
Project Homepage: http://www.samba.org
Dependencies
Optional
Optional (For the passdb libraries)
Configuration Information
To build Samba against Linux-PAM pass one of the following to configure:
--with-pam --with-pammodulesdir=/lib/security --with-pam --with-pammodulesdir=/lib32/security --with-pam --with-pammodulesdir=/lib64/security
Non-Multilib
Compile the package:
cd source3 && ./configure --prefix=/usr --sysconfdir=/etc \ --libdir=/usr/lib --localstatedir=/var \ --with-piddir=/var/run --with-fhs --with-cifsmount && make
Install the package
make ROOTSBINDIR=/sbin install-everything && install -v -m644 ../examples/smb.conf.default /etc/samba && install -v -m755 -d /usr/share/doc/samba-3.5.6 && install -v -m644 ../docs/*.pdf /usr/share/doc/samba-3.5.6 && ln -v -s ../../samba/swat /usr/share/doc/samba-3.5.6
Multilib
32Bit
Compile the package:
export USE_ARCH=32 && cd source3 && CC="gcc ${BUILD32}" ./configure --prefix=/usr --sysconfdir=/etc \ --libdir=/usr/lib --localstatedir=/var \ --with-piddir=/var/run --with-fhs --with-cifsmount && make
Install the package
make ROOTSBINDIR=/sbin install-everything
Clean up the enviornment:
unset USE_ARCH
N32
Compile the package:
export USE_ARCH=n32 && cd source3 && CC="gcc ${BUILDN32}" ./configure --prefix=/usr --sysconfdir=/etc \ --libdir=/usr/lib32 --localstatedir=/var \ --with-piddir=/var/run --with-fhs --with-cifsmount && make
Install the package
make ROOTSBINDIR=/sbin install-everything
Clean up the enviornment:
unset USE_ARCH
64Bit
Compile the package:
export USE_ARCH=64 && cd source3 && CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \ --libdir=/usr/lib64 --localstatedir=/var \ --with-piddir=/var/run --with-fhs --with-cifsmount && make
Install the package
make ROOTSBINDIR=/sbin install-everything && install -v -m644 ../examples/smb.conf.default /etc/samba && install -v -m755 -d /usr/share/doc/samba-3.5.6 && install -v -m644 ../docs/*.pdf /usr/share/doc/samba-3.5.6 && ln -v -s ../../samba/swat /usr/share/doc/samba-3.5.6
Clean up the enviornment:
unset USE_ARCH
Configuring
Bootscript
Install the init script for samba included in the bootscripts package:
make install-samba
Install the init script for winbind included in the bootscripts package:
make install-winbind
Creating /etc/samba/smb.conf
Client Only
Create a basic configuration file:
cat > /etc/samba/smb.conf << "EOF" [global] workgroup = MYGROUP dos charset = cp850 unix charset = ISO-8859-1 EOF
Client + Server Support
Add user NoBody for the server to run under. This is not needed of only using the client side, or if user/group NoBody already exist
groupadd -g 65534 nobody && useradd -c "Nobody" -d /dev/null \ -u 65534 -g nobody -s /bin/false nobody
Create a share for each user's home directory, and share all printers to Windows machines:
cat > /etc/samba/smb.conf << "EOF" [global] workgroup = MYGROUP dos charset = cp850 unix charset = ISO-8859-1 [homes] comment = Home Directories browseable = no writable = yes [printers] comment = All Printers path = /var/spool/samba browseable = no guest ok = no printable = yes EOF
At this point, you will most likely want to install SWAT (Samba Web Administration Tool) to manage /etc/samba/smb.conf from a web browser.
Adding Samba Users
smbpasswd -a