Thursday, March 10, 2011

linux OS

SAMBA SERVER
Samba is an open source implementation of the Server Message Block (SMB) protocol. It allows the networking of Microsoft Windows®, Linux, UNIX, and other operating systems together, enabling access to Windows-based file and printer shares. Samba's use of SMB allows it to appear as a Windows server to Windows clients.


SAMBA SERVER


Service                      : Samba

Install                          : # yum –y install samba (if there is NO smb in fedora packages)
                                                 DOWNLOAD N INSTALL
                                      # rpm –ivh <samba file> (if there is smb in fedora packages)
                                                UPLOAD FILE KITA-mesti tahu location dia duk katne????
                                                Rpm –ivh/ media/xxx/xxx/xxx (location file)
                                               # cd/ = file program files
                                               i = untuk edit folder
                                              Wq = save
                                             q! = force quit, not save
Check Status             : # rpm –q samba

Up service                 : # /sbin/service smb status – check status
  # /sbin/service smb start – start service
                                      # /sbin/service smb restart – restart service
                                      # /sbin/service smb stop - stop service

Configuration File    : vim /etc/samba/smb.conf  (pas2 tekan e untuk nak edit file kat dalam 2)
      Vim= command untuk nak edit fail, jadi pastikan directory yang               dibuka adalah file dan bukannya folder

Parameter                  : security = share I user I server
( Replace : security = share; no need smbpassword)
                                                 
  Create share folder: 
[demo]
                                                     Path = /demo
                                                     Writable = yes
                                                     Browseable = yes
                                                     Public = yes

Restart samba           : /sbin/service smb restart

Additional info           :

  • SELinux turn off          # vim  /etc/selinux/config
-          set selinux = disabled (reboot pc after set)
firewall

  • Iptables turn off           # service iptables stop
              (Also can set by using command #setup      service tool)

  • give user authority       : # mkdir /demo
  # chmod –R 777 /demo (full access)

                                    Find the number of 555 n 777
chmod mengubah hak akses dari setiap fail yang diberikan sesuai   dengan mode, yang dapat berupa perwakilan simbolik dari perubahan untuk membuat, atau nombor oktal mewakili pola bit untuk izin baru.
·         create user account & samba password       : #  adduser demo
      passwd demo
  #  smbpasswd –a demo
     (restart samba)

·         Uninstall samba          : yum uninstall samba
                                      rpm –e samba

Samba is a powerful and versatile server application. Even seasoned system administrators must know its abilities and limitations before attempting installation and configuration.
What Samba can do:
·         Serve directory trees and printers to Linux, UNIX, and Windows clients
·         Assist in network browsing (with or without NetBIOS)
·         Authenticate Windows domain logins
·         Provide Windows Internet Name Service (WINS) name server resolution
·         Act as a Windows NT®-style Primary Domain Controller (PDC)
·         Act as a Backup Domain Controller (BDC) for a Samba-based PDC
·         Act as an Active Directory domain member server
·         Join a Windows NT/2000/2003 PDC
What Samba cannot do:
·         Act as a BDC for a Windows PDC (and vice versa)
·         Act as an Active Directory domain controller


Samba deamon (smbd, nmbd and winbindd deamon is control by smb service)
1.      smbd – provide file sharing and printing service to windows clients. Responsible for user authentication, resource locking and data sharing through the SMB protocol. The default port for SMB traffic are TCP ports 139 and 445.
2.      nmbd – understand and replies to NetBIOS name service requests such as those produced by SMB/CIFS in Windows-based systems. participates in the browsing protocols that make up the Windows Network Neighborhood view. The default port that the server listens to for NMB traffic is UDP port 137.
3.      winbidd - service resolves user and group information on a server running Windows NT 2000 or Windows Server 2003.