1 / 74

Chapter

Chapter. Linux/Windows Internetworking. Chapter Objectives. Samba Practical Customization of Samba on a Linux Server Setting Up SWAT to Remotely Configure Samba on a Windows Client. Origin of Samba. Samba was originally developed in Australia. The Purpose of Samba.

jana-wood
Download Presentation

Chapter

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter Linux/Windows Internetworking

  2. Chapter Objectives • Samba • Practical Customization of Samba on a Linux Server • Setting Up SWAT to Remotely Configure Samba on a Windows Client

  3. Origin of Samba • Samba was originally developed in Australia

  4. The Purpose of Samba • Enable interoperability between Windows and Clients • Example: • Enables a Unix/Linux file server to be treated like a Windows NT file server by Windows clients • Enables an NT file server to be treated like a Unix file server by Unix/Linux clients ???

  5. Some More Uses for Samba • A NetBIOS nameserver (1001/1002) • A FTP style SMB client to access PC shared items (disks and printers) for Unix, Netware or other operating systems. • A tar extension for the clients, in order to create remote backups. • A command line, limited administration tool, that supports some features of Windows NT that may be used over Samba, Windows NT Workstation or Server.

  6. Yet, More Uses for Samba • Implementation of a password synchronization gateway, or printing gateway, between Unix and Windows NT. • Give access to Windows NT files from Unix. • Source: • http://www.linux-mandrake.com/guides71/en/mdkrefguide/samba-capability.html

  7. Operating Systems for Samba • Linux • Solaris • IRIX • The main o/s for Silicon Graphics workstations and servers. It incorporates Unix System V functionality. • HPUX • Almost all other versions of Unix

  8. Companies Using Samba • Cisco • Bank of America • Hewlett Packard • Johnson and Johnson • British Petroleum • Solomon Smith Barney (Citibank’s Investment Brokerage Division) Source: http://www.valinux.com/software/samba.html

  9. Samba and Windows • Windows NT OS uses a layered architecture with partitioned user and kernel modes similar to those of UNIX. • NETBIOS – over – TCP/IP (NetBT) is used by Samba to share UNIX resources with Windows clients • SMB AND CIFS are NetBT based protocols for communication between clients and servers

  10. SMB PROTOCOL • Created in 1987 as a joint venture between Microsoft and Intel • SMB is an acronym for Server Message Block • Excellent source on SMB • http://samba.anu.edu.au/cifs/docs/what-is-smb.html

  11. Purpose of SMB • SMB, which stands for Server Message Block, is a protocol for sharing files, printers, serial ports, and communications abstractions such as named pipes and mail slots between computers http://samba.anu.edu.au/cifs/docs/what-is-smb.html

  12. SMB Operation http://samba.anu.edu.au/cifs/docs/what-is-smb.html

  13. SMB’s Place in the ISO-OSI Model http://samba.anu.edu.au/cifs/docs/what-is-smb.html

  14. SMB Functions • 1) Session commands: used to set up a virtual circuit and validate access. • 2) File commands: permits an application to operate on files. • 3) Printer commands: permits an application to spool jobs to remote printers. • 4) Message commands: provide a means for passing alert, control, and informational messages between the consumer and server applications

  15. CIFSCommon Internet File System • In 1997 Microsoft submitted CIFS specification to IETF • It is a derivation of SMB offered as a public domain specification

  16. Kerberos Ticket Exchange Source: Samba Unix & NT Internetworking

  17. End of Module

  18. Module Samba Installation and Usage

  19. Obtaining Samba • Samba can be downloaded from www.samba.org • Samba is often supplied as part of the Linux package by vendors

  20. Installing Samba • Samba is installed as one of the packages when installing Linux • Any RPM installation facility can be used for the installation of Samba • An example would be to use KDE’s package installation feature to install Samba

  21. Samba Installation and Configuration Example • Source • http://www.linux-mandrake.com/guides71/en/mdkrefguide/samba.html

  22. Samba Installation and Configuration Overview Install Samba from CD-ROM Configure Samba Server (samba.conf) Install Samba tools as necessary Test configuration and launch Samba Install SWAT GUI tool if desired

  23. Installing Samba • If you already use Samba, run /etc/rc.d/init.d/smb stop. Otherwise, on the installation CDROM you will find the package named samba which you can install, as root, with command rpm -Uvh samba-*.

  24. Smb.conf File • During installation a /etc/smb.conf file is copies to the computer • Entries in this file must be changed to configure Samba

  25. Key Areas of Configuration • Global • Printers • Homes

  26. Sample samba.conf • View • http://www.linux-mandrake.com/guides71/en/mdkrefguide/samba-conf.html

  27. Global [global] netbios name = Zeus netbios aliases = creation # without these two entries, the first part of the # DNS name will be used instead. workgroup = DESIGN # Samba can only belong to one work group at a time server string = File server [%v] # this indicates the name and the version number to print

  28. Global Cont. deadtime = 15 # maximal inactivity time auto services = john # this service, although present in the exploration list, is not available until john connects to the server security = user

  29. Security Modes • Share mode • User mode • Server mode • Domain mode

  30. Share Mode • {share mode}: In this mode, the client sends a password while asking for a connection, but no username is required. This mode is the default security mode for files or printers under Windows 95. It may be changed, under Windows 95 in the Network section of the Configuration Panel, under Access Control.

  31. User Mode • {user mode}: This security mode is recommended. You are asked for a valid username and its associated password.

  32. Server and Domain Mode • {server mode}: This mode is derived from user mode. The Samba server sends a session opening request to the passwords server. password server = NT_passerv #where NT_passerv is the name of the NT passwords server. Various servers may belisted. • {domain mode}: Nearly the same as server mode

  33. Adding Hosts to Access the Linux server hosts allow = john.design.org 192.168.2. #Allows all users from john.design.org and all hosts with the beginning TCP/IP address 192.168.2. Deny 192.168.2.5 #Deny access from host 192.168.2.5

  34. Creating a Guest Account guest account = pcguest # If you wish to add a guest user; to be # added in /etc/passwd

  35. Setting Up a Share • First of all, create the shared directory with the command mkdir /home/shared and set owners and permissions with chmod and chown. • For example, chmod 0777 gives all rights towards this folder on the Unix side. However, Samba has to allow this too.

  36. Commands to Create a Share • [share] • comment = share access granted to everyone • path = /home/shared • browsable = yes • writable = yes • create mask = 0750 • # means that the creator of the file has rwx • # rights on it, the group r-x and others r– • directory mask = 0750 • # same meaning but for directories • mangled names = yes • # converts names in a DOS/Windows manner, with • # eight characters for the name and three for the • # extension. • preserve case = no • # do not take case into account.

  37. Another Share Example • [zip] • comment = automatically mount/unmount the zip drive • browseable = yes • path = /mnt/zip • root preexec = /bin/mount /dev/sda4 /mnt/zip • root postexec = /bin/unmount /mnt/zip First of all, be sure to load the ppa module with command modprobe ppa.o.

  38. Creating Home Directory for Users • [homes] • comment = Home directories • browseable = no • writable = yes • path = /export/homes/%U • valid users = %S

  39. Setting Up a Printer for Sharing • [printers] • comment = shared printers • path = /var/spool/samba • load printers = yes • # load all available printers • browseable = no • printable = yes • public = no • writable = no • create mode = 0700

  40. Sample samba.conf File • [global] • workgroup = MyWorkGroup • server string = (Samba %v) • #server string = Samba Server • browseable = yes • printing = bsd printcap • name = /etc/printcap • load printers = yes • log file = /var/log/samba/log.%m max • log size = 100 • lock directory = /var/lock/samba • locking = no • strict locking = no • share modes = yes

  41. Sample samba.conf File Cont. security = user null passwords = yes socket options = TCP_NODELAY # Allows the Samba server to become a domain controller #os level = 33 #domain master = yes # Facilitates the long names recognition preserve case = no short preserve case = no character set = iso8859-1

  42. Sample samba.conf File Cont. [homes] comment = Home Directories preexec = /bin/sh -c 'echo /usr/bin/smbclient -M %m -I %I'& browseable = yes readonfiltered= no writable = yes create mode = 0750 public = yes

  43. Sample samba.conf File Cont. ["public"] comment = "Public" path = /public/ browseable = yes hide dot files = yes readonfiltered= no public = yes pritable = yes #create mode = 0775 printable = no

  44. Sample samba.conf File Cont. ["printers"] comment = All Printers #path = /var/spool/samba path = /var/spool/lpd/lp browseable = yes # Set public = yes to allow user 'guest account' to print guest ok = yes writable = yes printable = yes

  45. Set Temporary File Space [tmp] comment = Temporary file space path = /tmp read only = no public = yes

  46. Check for Changes Made • Now save changes to smb.conf • Before launching smb and nmb daemons, launch testparm. This command will read /etc/smb.conf and print which entries will be taken into account

  47. Reload Samba • No need to reboot the computer • Reload Samba using Unix command to activate the new configuration • samba stop • samba start

  48. Using the Command Mode to Reload Samba • Then just type /etc/rc.d/init.d/smb start. The following messages should be printed: Starting SMB services: [OK] Starting NMB services: [OK] To check that the daemon is running, run ps aux | grep smbd or /etc/rc.d/init.d/smb status

  49. End of Samba Configuration • The Samba server is now ready for use

  50. Accessing Linux File Server from a PC Client • Login on a PC Client using a guest ID and password preset at Linux server • Open Network Neighborhood • The Linux server should show up as it were in a NT network • Shared Resources Shown • Printer(s) • Public folder – [tmp] • Private folders [homes] [client-name]

More Related