Chapter 8

681 views
598 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
681
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
34
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter 8

  1. 1. SUSE Linux Enterprise Server Administration (Course 3037) Chapter 8 Enable Infrastructure Services
  2. 2. Objectives <ul><li>Configure and Manage Network Printing Services </li></ul><ul><li>Configure Network File Systems </li></ul><ul><li>Manage Resources on the Network </li></ul>
  3. 3. Configure and Manage Network Printing Services <ul><li>Objectives </li></ul><ul><ul><li>Printers and Linux Support </li></ul></ul><ul><ul><li>CUPS and SUSE Linux Enterprise Server </li></ul></ul><ul><ul><li>How to Configure a SUSE Linux Enterprise Server Network Printer </li></ul></ul><ul><ul><li>How to Modify a SUSE Linux Enterprise Server Network Printer </li></ul></ul><ul><ul><li>How to Manage Printing from the Command Line </li></ul></ul><ul><ul><li>How to Access the CUPS Web Administration Tools </li></ul></ul><ul><ul><li>How to Troubleshoot the CUPS Print System </li></ul></ul>
  4. 4. Printers and Linux Support <ul><li>Check the following sources: </li></ul><ul><ul><li>http://cdb.suse.de/ or http://hardwaredb.suse.de/ </li></ul></ul><ul><ul><ul><li>SUSE Linux Enterprise Server printer database </li></ul></ul></ul><ul><ul><li>www.linuxprinting.org/ </li></ul></ul><ul><ul><ul><li>Contains printer database on linuxprinting.org </li></ul></ul></ul><ul><ul><li>www.cs.wisc.edu/~ghost/ </li></ul></ul><ul><ul><ul><li>Ghostscript Web page </li></ul></ul></ul><ul><ul><li>file:/usr/share/doc/packages/ghostscript/catalog.devices </li></ul></ul><ul><ul><ul><li>This lists included drivers </li></ul></ul></ul>
  5. 5. CUPS and SUSE Linux Enterprise Server <ul><li>CUPS (Common Unix Printing System) </li></ul><ul><ul><li>Default printing system of the SLES </li></ul></ul><ul><li>How CUPS handles print jobs </li></ul><ul><ul><li>Print job is created by a user or a program </li></ul></ul><ul><ul><li>The file to print is saved in a queue </li></ul></ul><ul><ul><li>Printer daemon cupsd collects file to print from the queue </li></ul></ul><ul><ul><li>Printer receives the data and prints it </li></ul></ul><ul><ul><li>Print job is removed from the queue </li></ul></ul>
  6. 6. CUPS and SUSE Linux Enterprise Server (continued) <ul><li>How the cupsd daemon works </li></ul><ul><ul><li>Printer daemon cupsd </li></ul></ul><ul><ul><ul><li>Administers local queues and filters </li></ul></ul></ul><ul><ul><ul><li>Converts data to print to a printer-specific format </li></ul></ul></ul><ul><ul><li>Steps </li></ul></ul><ul><ul><ul><li>cupsd gets submitted print jobs from the queue </li></ul></ul></ul><ul><ul><ul><ul><li>And sends them to the printer </li></ul></ul></ul></ul><ul><ul><ul><li>cupsd then executes the print jobs in the queue in order </li></ul></ul></ul><ul><ul><ul><li>Data is converted to PostScript </li></ul></ul></ul><ul><ul><ul><li>Number of pages is determined with the tool pstops </li></ul></ul></ul><ul><ul><ul><li>Printer-specific filters start </li></ul></ul></ul>
  7. 7. CUPS and SUSE Linux Enterprise Server (continued)
  8. 8. How to Configure a SUSE Linux Enterprise Server Network Printer <ul><li>SUSE Linux Enterprise Server and supported printing protocols </li></ul><ul><ul><li>socket </li></ul></ul><ul><ul><ul><li>Connection in which data is sent to an Internet socket </li></ul></ul></ul><ul><ul><ul><ul><li>Without first performing a data handshake </li></ul></ul></ul></ul><ul><ul><li>LPD (Line Printer Daemon) </li></ul></ul><ul><ul><ul><li>Printer queue is sent before the actual print data </li></ul></ul></ul><ul><ul><ul><li>Accepts any name as the printer queue </li></ul></ul></ul><ul><ul><ul><li>Port number for an LPD service is 515 </li></ul></ul></ul><ul><ul><ul><li>Device URI example: lpd://host-printer/LPT1 </li></ul></ul></ul>
  9. 9. How to Configure a SUSE Linux Enterprise Server Network Printer (continued) <ul><li>SUSE Linux Enterprise Server and supported printing protocols (continued) </li></ul><ul><ul><li>IPP (Internet Printing Protocol) </li></ul></ul><ul><ul><ul><li>Based on the HTTP protocol </li></ul></ul></ul><ul><ul><ul><li>Transmits much more job-related data </li></ul></ul></ul><ul><ul><ul><li>CUPS uses IPP for the internal data transmission </li></ul></ul></ul><ul><ul><ul><li>Port number for IPP is 631 </li></ul></ul></ul><ul><ul><li>SMB (Standard Message Block) </li></ul></ul><ul><ul><ul><li>Can print on printers connected to Windows shares </li></ul></ul></ul><ul><ul><ul><li>Port numbers 137, 138, and 139 </li></ul></ul></ul>
  10. 10. How to Configure a SUSE Linux Enterprise Server Network Printer (continued) <ul><li>SUSE Linux Enterprise Server and PostScript printers </li></ul><ul><ul><li>PPD (PostScript Printer Description) </li></ul></ul><ul><ul><ul><li>Computer language that describes the properties and options of PostScript printers </li></ul></ul></ul><ul><ul><li>During installation a lot of PPD files are preinstalled </li></ul></ul><ul><ul><li>If a PostScript printer is configured </li></ul></ul><ul><ul><ul><li>Get a suitable PPD file and store it in the directory /usr/share/cups/model/ </li></ul></ul></ul>
  11. 11. How to Configure a SUSE Linux Enterprise Server Network Printer (continued) <ul><li>How to configure a network printer with YaST </li></ul><ul><ul><li>Start YaST Printer module </li></ul></ul><ul><ul><li>Add a new printer manually </li></ul></ul><ul><ul><li>Select the printer type </li></ul></ul><ul><ul><li>Save the configuration by selecting Finish </li></ul></ul>
  12. 12. How to Configure a SUSE Linux Enterprise Server Network Printer (continued)
  13. 13. How to Configure a SUSE Linux Enterprise Server Network Printer (continued)
  14. 14. How to Configure a SUSE Linux Enterprise Server Network Printer (continued)
  15. 15. How to Configure a SUSE Linux Enterprise Server Network Printer (continued) <ul><li>How to configure a network from the command line </li></ul><ul><ul><li>Use lpadmin command </li></ul></ul><ul><ul><ul><li>lpadmin -p <queue> -v <device-URI> -P <PPD-file> -E </li></ul></ul></ul><ul><ul><li>Enable a parallel printer example </li></ul></ul><ul><ul><ul><li>lpadmin -p ps -v parallel:/dev/lp0 -P /usr/share/cups/model/Postscript.ppd.gz –E </li></ul></ul></ul><ul><ul><li>Enable a network printer example </li></ul></ul><ul><ul><ul><li>lpadmin -p ps -v socket://192.168.1.0:9100/ -P /usr/share/cups/model/Postscript-level1.ppd.gz -E </li></ul></ul></ul>
  16. 16. How to Modify a SUSE Linux Enterprise Server Network Printer <ul><li>How to modify a network printer with YaST </li></ul><ul><ul><li>Start YaST Printer module </li></ul></ul><ul><ul><li>Select Change </li></ul></ul><ul><ul><li>Edit an existing network printer configuration </li></ul></ul><ul><ul><li>Select an option area; then select Edit </li></ul></ul><ul><ul><li>Save the configuration </li></ul></ul><ul><ul><li>Close YaST Control Center (optional) </li></ul></ul>
  17. 17. How to Modify a SUSE Linux Enterprise Server Network Printer (continued)
  18. 18. How to Modify a SUSE Linux Enterprise Server Network Printer (continued)
  19. 19. How to Modify a SUSE Linux Enterprise Server Network Printer (continued) <ul><li>How to modify a network printer from the command line </li></ul><ul><ul><li>List all options for a printer </li></ul></ul><ul><ul><ul><li>lpoptions -p queue-name -l </li></ul></ul></ul><ul><ul><li>Change an option using the lpadmin command </li></ul></ul><ul><ul><li>Check the new setting </li></ul></ul><ul><ul><ul><li>lpoptions -p queue-name -l </li></ul></ul></ul>
  20. 20. How to Modify a SUSE Linux Enterprise Server Network Printer (continued) <ul><li>How to modify printer settings from KDE </li></ul><ul><ul><li>kprinter </li></ul></ul><ul><ul><ul><li>KDE utility for changing the properties of a printer stored in its ppd file </li></ul></ul></ul><ul><ul><li>Steps </li></ul></ul><ul><ul><ul><li>Start kprinter from an application </li></ul></ul></ul><ul><ul><ul><ul><li>Or from the command line by entering kprinter </li></ul></ul></ul></ul><ul><ul><ul><li>Select the printer you want to modify </li></ul></ul></ul><ul><ul><ul><li>Save new configuration </li></ul></ul></ul>
  21. 21. How to Modify a SUSE Linux Enterprise Server Network Printer (continued)
  22. 22. How to Modify a SUSE Linux Enterprise Server Network Printer (continued)
  23. 23. How to Manage Printing from the Command Line <ul><li>Basic printer management </li></ul><ul><ul><li>/usr/bin/enable printer </li></ul></ul><ul><ul><ul><li>Starts a printer queue for the indicated printer </li></ul></ul></ul><ul><ul><li>/usr/bin/disable printer </li></ul></ul><ul><ul><ul><li>Stops a printer queue for the indicated printer </li></ul></ul></ul><ul><ul><li>/usr/sbin/reject printer </li></ul></ul><ul><ul><ul><li>Rejects print jobs for the indicated printer </li></ul></ul></ul><ul><ul><li>/usr/sbin/accept printer </li></ul></ul><ul><ul><ul><li>Accepts print jobs for the indicated printer </li></ul></ul></ul>
  24. 24. How to Manage Printing from the Command Line (continue) <ul><li>CUPS printer commands </li></ul><ul><ul><li>CUPS provides two kinds of commands </li></ul></ul><ul><ul><ul><li>Berkeley3 and System V </li></ul></ul></ul><ul><ul><li>Submit a print job </li></ul></ul><ul><ul><ul><li>Berkeley: lpr -P queue file </li></ul></ul></ul><ul><ul><ul><li>System V: lp -d queue file </li></ul></ul></ul><ul><ul><li>Display print jobs </li></ul></ul><ul><ul><ul><li>Berkeley: lpq -P queue </li></ul></ul></ul><ul><ul><ul><li>System V: lpstat -o queue -p queue </li></ul></ul></ul>
  25. 25. How to Manage Printing from the Command Line (continue) <ul><li>CUPS printer commands (continued) </li></ul><ul><ul><li>Cancel print jobs </li></ul></ul><ul><ul><ul><li>Berkeley: lprm -P queue jobnumber </li></ul></ul></ul><ul><ul><ul><li>System V: cancel queue-jobnumber </li></ul></ul></ul><ul><ul><li>Configure a queue </li></ul></ul><ul><ul><ul><li>lpoptions -p queue -l </li></ul></ul></ul><ul><ul><ul><li>lpoptions -p queue -o option=value </li></ul></ul></ul><ul><ul><ul><ul><li>Changes the options of a queue </li></ul></ul></ul></ul>
  26. 26. How to Manage Printing from the Command Line (continue) <ul><li>SUSE Linux Enterprise Server printer commands </li></ul><ul><ul><li>Disable a print queue </li></ul></ul><ul><ul><ul><li>/usr/bin/disable queue </li></ul></ul></ul><ul><ul><li>Enable a print queue </li></ul></ul><ul><ul><ul><li>/usr/bin/enable queue </li></ul></ul></ul><ul><ul><li>Reject print jobs </li></ul></ul><ul><ul><ul><li>/usr/bin/reject queue </li></ul></ul></ul><ul><ul><li>Accept print jobs </li></ul></ul><ul><ul><ul><li>/usr/bin/accept queue </li></ul></ul></ul>
  27. 27. How to Access the CUPS Web Administration Tools <ul><li>Enter the following: </li></ul><ul><ul><li>http://localhost:631 </li></ul></ul><ul><li>You can manage printer classes, jobs, and printers </li></ul><ul><li>root must be set up as a CUPS administrator </li></ul><ul><ul><li>With CUPS administration group sys and a CUPS password </li></ul></ul><ul><li>Do this as the root user by entering: </li></ul><ul><ul><li>lppasswd -g sys -a root </li></ul></ul>
  28. 28. How to Access the CUPS Web Administration Tools (continued)
  29. 29. How to Troubleshoot the CUPS Print System <ul><li>Set the log level to record errors </li></ul><ul><ul><li>Messages are written to /var/log/cups/error_log </li></ul></ul><ul><ul><li>By default, only inquiries and status changes are logged to the file </li></ul></ul><ul><ul><li>Change LogLevel option in cupsd configuration file </li></ul></ul><ul><ul><ul><li>/etc/cups/cupsd.conf </li></ul></ul></ul><ul><ul><li>Restart CUPS by entering rccups restart </li></ul></ul><ul><li>Check the access log </li></ul><ul><ul><li>File /var/log/cups/access_log </li></ul></ul><ul><ul><ul><li>Logs every access to the CUPS daemon </li></ul></ul></ul>
  30. 30. How to Troubleshoot the CUPS Print System (continued)
  31. 31. How to Troubleshoot the CUPS Print System (continued) <ul><li>Perform basic troubleshooting </li></ul><ul><ul><li>Set LogLevel to debug in the /etc/cups/cupsd.conf </li></ul></ul><ul><ul><li>Stop cupsd by entering rccupsd stop </li></ul></ul><ul><ul><li>Avoid searching through large log files </li></ul></ul><ul><ul><ul><li>By renaming the file /var/log/cups/error_log </li></ul></ul></ul><ul><ul><li>Start cupsd by entering rccupsd start </li></ul></ul><ul><ul><li>Repeat the action that led to the problem </li></ul></ul><ul><ul><li>Check the messages in /var/log/cups/error_log </li></ul></ul><ul><ul><ul><li>To identify the cause of the problem </li></ul></ul></ul>
  32. 32. Exercise 8-1 Configure CUPS Network Printing Services <ul><li>In this exercise, you do the following: </li></ul><ul><ul><li>Part I: Add a Printer to the Network with YaST </li></ul></ul><ul><ul><li>Part II: Manage the Printer from the Command Line </li></ul></ul><ul><ul><li>Part III: Manage the Printer with YaST </li></ul></ul><ul><ul><li>Part IV: Provide Access to the CUPS Administrator </li></ul></ul><ul><ul><li>Part V: Print to a Remote CUPS Printer </li></ul></ul>
  33. 33. Configure Network File Systems <ul><li>Objectives </li></ul><ul><ul><li>Network File System (NFS) </li></ul></ul><ul><ul><li>Samba (CIFS) </li></ul></ul>
  34. 34. Network File System (NFS) <ul><li>Network File System (NFS) </li></ul><ul><ul><li>Lets you configure an NFS file server </li></ul></ul><ul><ul><ul><li>That gives users transparent access to programs, files, or storage space on the server </li></ul></ul></ul><ul><li>Network File System basics </li></ul><ul><ul><li>Requires a NFS server and NFS clients </li></ul></ul><ul><ul><li>File systems are exported by an NFS server </li></ul></ul><ul><ul><ul><li>And appear and behave on a NFS client </li></ul></ul></ul><ul><ul><li>Used with Network Information Service (NIS) </li></ul></ul><ul><ul><ul><li>To provide centralized user management on a network </li></ul></ul></ul>
  35. 35. Network File System (NFS) (continued)
  36. 36. Network File System (NFS) (continued) <ul><li>Network File System basics </li></ul><ul><ul><li>A computer can be both a NFS server and client </li></ul></ul><ul><ul><li>NFS server generally has a very large hard disk capacity </li></ul></ul><ul><ul><li>NFS daemon is part of the kernel </li></ul></ul><ul><ul><ul><li>The start script is /etc/init.d/nfsserver </li></ul></ul></ul><ul><li>How NFS works </li></ul><ul><ul><li>NFS and NIS are Remote Procedure Call (RPC) services </li></ul></ul>
  37. 37. Network File System (NFS) (continued) <ul><li>How NFS works </li></ul><ul><ul><li>Portmapper </li></ul></ul><ul><ul><ul><li>Manages RPC services </li></ul></ul></ul><ul><ul><li>When an RPC service starts up </li></ul></ul><ul><ul><ul><li>It binds to a port in the system </li></ul></ul></ul><ul><ul><ul><li>Communicates this port to the portmapper </li></ul></ul></ul><ul><ul><li>File locking activated through script /etc/init.d/nfslock </li></ul></ul><ul><ul><li>Use command /etc/init.d/nfsserver to start NFS server </li></ul></ul><ul><ul><li>NFS service daemon (/usr/sbin/rpc.nfsd) </li></ul></ul><ul><ul><ul><li>Starts the required kernel threads </li></ul></ul></ul>
  38. 38. Network File System (NFS) (continued)
  39. 39. Network File System (NFS) (continued) <ul><li>How NFS works (continued) </li></ul><ul><ul><li>mount daemon (/usr/sbin/rpc.mountd) </li></ul></ul><ul><ul><ul><li>Accepts mount request and compares it with the entries in the configuration file /etc/exports </li></ul></ul></ul><ul><ul><li>By default, four server threads are started </li></ul></ul><ul><li>NFS configuration overview </li></ul><ul><ul><li>Configuration settings are stored in /etc/exports </li></ul></ul><ul><ul><li>Client-side configuration file /etc/fstab </li></ul></ul><ul><ul><li>NFS server and clients can be configured with YaST </li></ul></ul><ul><ul><ul><li>You can also modify the configuration files directly </li></ul></ul></ul>
  40. 40. Network File System (NFS) (continued) <ul><li>How to configure NFS server with YaST </li></ul><ul><ul><li>Start YaST NFS Server module </li></ul></ul><ul><ul><li>Select Start NFS Server; then select Next </li></ul></ul><ul><ul><li>Add a directory for export </li></ul></ul><ul><ul><li>Add other directories by selecting Add directory </li></ul></ul><ul><ul><li>Add, edit, or delete a host for a directory </li></ul></ul><ul><ul><li>Save the configuration by selecting Finish </li></ul></ul>
  41. 41. Network File System (NFS) (continued)
  42. 42. Network File System (NFS) (continued)
  43. 43. Network File System (NFS) (continued)
  44. 44. Network File System (NFS) (continued) <ul><li>How to configure NFS server manually </li></ul><ul><ul><li>Check for service (daemon) availability </li></ul></ul><ul><ul><li>Configure the services to be available at bootup </li></ul></ul><ul><ul><li>Define exported directories in /etc/exports </li></ul></ul><ul><ul><li>Set permissions for exported directories in /etc/exports </li></ul></ul><ul><ul><li>Restart mountd and nfsd </li></ul></ul><ul><li>How to temporarily export a directory </li></ul><ul><ul><li>Use command exportfs </li></ul></ul>
  45. 45. Network File System (NFS) (continued)
  46. 46. Network File System (NFS) (continued) <ul><li>How to configure NFS client access with YaST </li></ul><ul><ul><li>Start the YaST NFS Client module </li></ul></ul><ul><ul><li>Add a directory to the list by selecting Add </li></ul></ul><ul><ul><li>Configure the directory </li></ul></ul><ul><ul><li>Save the NFS client settings by selecting Finish </li></ul></ul><ul><ul><li>Close the YaST Control Center </li></ul></ul>
  47. 47. Network File System (NFS) (continued)
  48. 48. Network File System (NFS) (continued)
  49. 49. Network File System (NFS) (continued) <ul><li>How to configure and mount NFS directories </li></ul><ul><ul><li>Mount NFS directories automatically </li></ul></ul><ul><ul><ul><li>Make corresponding entries in the file /etc/fstab </li></ul></ul></ul><ul><ul><ul><li>Start script /etc/init.d/nfs loads the file /etc/fstab </li></ul></ul></ul><ul><ul><ul><li>Have the system read changes by entering mount -a </li></ul></ul></ul><ul><ul><ul><li>Activate start script of NFS client with insserv nfs </li></ul></ul></ul><ul><ul><li>Import directories manually from an NFS server </li></ul></ul><ul><ul><ul><li>Use command mount </li></ul></ul></ul><ul><ul><ul><li>Run RPC port mapper as root </li></ul></ul></ul><ul><ul><ul><ul><li>Use rcportmap start </li></ul></ul></ul></ul>
  50. 50. Network File System (NFS) (continued) <ul><li>How to configure and mount NFS directories </li></ul><ul><ul><li>Import directories manually from an NFS server </li></ul></ul><ul><ul><ul><li>Use –t option to indicate file system type </li></ul></ul></ul><ul><ul><ul><li>Use –o option to mount directory like a local partition </li></ul></ul></ul><ul><ul><ul><ul><li>soft (opposite:hard) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>bg (default:bg) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>rsize=n </li></ul></ul></ul></ul><ul><ul><ul><ul><li>wsize=n </li></ul></ul></ul></ul><ul><ul><ul><ul><li>retry=n </li></ul></ul></ul></ul><ul><ul><ul><ul><li>nosuid </li></ul></ul></ul></ul><ul><ul><ul><ul><li>nodev </li></ul></ul></ul></ul>
  51. 51. Network File System (NFS) (continued) <ul><li>How to monitor the NFS system </li></ul><ul><ul><li>rpcinfo –p </li></ul></ul><ul><ul><ul><li>Displays information about the portmapper </li></ul></ul></ul><ul><ul><ul><li>-p option displays all programs registered with the portmapper </li></ul></ul></ul><ul><ul><li>NFS server daemon registers itself with the name nfs </li></ul></ul><ul><ul><li>showmount </li></ul></ul><ul><ul><ul><li>Displays information about the exported directories of an NFS server </li></ul></ul></ul>
  52. 52. Exercise 8-2 Set Up and Manage Network File System (NFS) <ul><li>In this exercise, you do the following: </li></ul><ul><ul><li>Part I: Add a Remote File System to the NFS Client </li></ul></ul><ul><ul><li>Part II: Set Up an NFS Server </li></ul></ul>
  53. 53. Samba (CIFS) <ul><li>Samba </li></ul><ul><ul><li>Implements Microsoft networking protocols </li></ul></ul><ul><ul><li>Server Message Block (SMB) </li></ul></ul><ul><ul><ul><li>Protocol for sharing resources between networked computers </li></ul></ul></ul><ul><ul><li>Common Internet File System (CIFS) </li></ul></ul><ul><ul><ul><li>Implementation of SMB over native TCP/IP </li></ul></ul></ul><ul><ul><ul><li>Does not require NetBIOS </li></ul></ul></ul>
  54. 54. Samba (CIFS) (continued) <ul><li>Samba features and version </li></ul><ul><ul><li>Support for Active Directory </li></ul></ul><ul><ul><li>Much improved Unicode support </li></ul></ul><ul><ul><li>Complete revision of the internal authentication mechanisms </li></ul></ul><ul><ul><li>Improved support for the Windows 200 x /XP printing system </li></ul></ul><ul><ul><li>The ability to set up servers as member servers in Active Directory domains </li></ul></ul><ul><ul><li>Adoption of an NT4 domain, enabling the migration from an NT4 domain to a Samba domain </li></ul></ul>
  55. 55. Samba (CIFS) (continued) <ul><li>Samba client support on Linux </li></ul><ul><ul><li>TCP/IP protocol must be installed on all computers </li></ul></ul><ul><ul><li>Samba provides a client for the different UNIX versions </li></ul></ul><ul><ul><li>SMB server share </li></ul></ul><ul><ul><ul><li>Provides hard disk space to their clients </li></ul></ul></ul><ul><ul><ul><li>Share includes a directory and its subdirectories on the server </li></ul></ul></ul><ul><ul><ul><li>Can be accessed by its name </li></ul></ul></ul><ul><ul><li>Printer is also assigned a name </li></ul></ul>
  56. 56. Samba (CIFS) (continued) <ul><li>Samba services and configuration files </li></ul><ul><ul><li>rcnmb start && rcsmb start </li></ul></ul><ul><ul><ul><li>Starts services required by Samba </li></ul></ul></ul><ul><ul><li>rcsmb stop && rcnmb stop </li></ul></ul><ul><ul><ul><li>Stops Samba services </li></ul></ul></ul><ul><ul><li>/etc/samba/smb.conf </li></ul></ul><ul><ul><ul><li>Samba configuration file </li></ul></ul></ul><ul><ul><ul><li>Sections </li></ul></ul></ul><ul><ul><ul><ul><li>[global] section </li></ul></ul></ul></ul><ul><ul><ul><ul><li>[share] sections </li></ul></ul></ul></ul>
  57. 57. Samba (CIFS) (continued) <ul><li>Samba services and configuration files (continued) </li></ul><ul><ul><li>[global] section configuration </li></ul></ul><ul><ul><ul><li>Parameters </li></ul></ul></ul><ul><ul><ul><ul><li>workgroup = TUX-NET </li></ul></ul></ul></ul><ul><ul><ul><ul><li>netbiosname = MYNAME </li></ul></ul></ul></ul><ul><ul><ul><ul><li>os level = 2 </li></ul></ul></ul></ul><ul><ul><ul><ul><li>wins support and wins server </li></ul></ul></ul></ul><ul><ul><li>[cdrom] shares configuration example </li></ul></ul><ul><ul><ul><li>comment = Linux CD-ROM </li></ul></ul></ul><ul><ul><ul><li>path = /media/cdrom </li></ul></ul></ul><ul><ul><ul><li>locking = No </li></ul></ul></ul>
  58. 58. Samba (CIFS) (continued) <ul><li>Samba services and configuration files (continued) </li></ul><ul><ul><li>[homes] shares configuration example </li></ul></ul><ul><ul><ul><li>comment = Home Directories </li></ul></ul></ul><ul><ul><ul><li>valid users = %S </li></ul></ul></ul><ul><ul><ul><li>browseable = No </li></ul></ul></ul><ul><ul><ul><li>read only = No </li></ul></ul></ul><ul><ul><ul><li>create mask = 0640 </li></ul></ul></ul><ul><ul><ul><li>directory mask = 750 </li></ul></ul></ul><ul><ul><ul><li>inherit permissions = Yes </li></ul></ul></ul>
  59. 59. Samba (CIFS) (continued) <ul><li>Samba services and configuration files (continued) </li></ul><ul><ul><li>Share password protection </li></ul></ul><ul><ul><ul><li>Each share access can be protected with a password </li></ul></ul></ul><ul><ul><ul><li>SMB has three possible ways of checking permissions </li></ul></ul></ul><ul><ul><ul><ul><li>Share Level Security (security = share) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>User Level Security (security = user) </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Server Level Security (security = server) </li></ul></ul></ul></ul>
  60. 60. Samba (CIFS) (continued) <ul><li>How to configure a Samba server with YaST </li></ul><ul><ul><li>Start the YaST Samba Server module </li></ul></ul><ul><ul><li>Select an available workgroup or domain on the network </li></ul></ul><ul><ul><li>Continue by selecting Next </li></ul></ul><ul><ul><li>Select a domain controller type for your Samba server </li></ul></ul>
  61. 61. Samba (CIFS) (continued)
  62. 62. Samba (CIFS) (continued)
  63. 63. Samba (CIFS) (continued)
  64. 64. Samba (CIFS) (continued) <ul><li>How to configure a Samba server with YaST </li></ul><ul><ul><li>Configure the system services to start on bootup by selecting On </li></ul></ul><ul><ul><li>Display a list of configured shares by selecting Shares </li></ul></ul><ul><ul><li>Display options for configuring the Samba server identity by selecting Identity </li></ul></ul><ul><ul><li>Display a list of trusted domains by selecting Trusted Domains </li></ul></ul><ul><ul><li>Save the settings by selecting Finish </li></ul></ul><ul><ul><li>Close the YaST Control Center (optional) </li></ul></ul>
  65. 65. Samba (CIFS) (continued)
  66. 66. Samba (CIFS) (continued)
  67. 67. Samba (CIFS) (continued)
  68. 68. Samba (CIFS) (continued) <ul><li>How to configure a Samba client with YaST </li></ul><ul><ul><li>Start the YaST Samba Client module </li></ul></ul><ul><ul><li>Enter name of a workgroup or NT domain for the Samba client membership </li></ul></ul><ul><ul><li>Allow for verification of passwords against an NT server </li></ul></ul><ul><ul><li>Save the Samba client configuration settings by selecting Finish </li></ul></ul><ul><ul><li>Close the YaST Control Center (optional) </li></ul></ul>
  69. 69. Samba (CIFS) (continued)
  70. 70. How to Monitor and Test Samba <ul><li>Diagnosis tools </li></ul><ul><ul><li>/usr/bin/testparm </li></ul></ul><ul><ul><ul><li>Performs a syntax check of /etc/samba/smb.conf </li></ul></ul></ul><ul><ul><li>/usr/bin/nmblookup </li></ul></ul><ul><ul><ul><li>Displays the registered local or remote names of a host </li></ul></ul></ul><ul><ul><li>/usr/bin/smbclient </li></ul></ul><ul><ul><ul><li>Checks network resources and establishes connections </li></ul></ul></ul><ul><ul><li>/usr/bin/smbstatus </li></ul></ul><ul><ul><ul><li>Lists current existing connections to the Samba server </li></ul></ul></ul>
  71. 71. How to Monitor and Test Samba (continued) <ul><li>How to start and test Samba </li></ul><ul><ul><li>Samba needs /etc/samba/smb.conf file </li></ul></ul><ul><ul><ul><li>With an entry about the workgroup </li></ul></ul></ul><ul><ul><li>rcsmb start </li></ul></ul><ul><ul><ul><li>Makes host visible with its host name in a Windows environment </li></ul></ul></ul><ul><ul><li>nmblookup </li></ul></ul><ul><ul><ul><li>Checks whether the new Samba host is already visible </li></ul></ul></ul><ul><ul><ul><ul><li>In the network environment </li></ul></ul></ul></ul>
  72. 72. Exercise 8-3 Configure a Basic Samba Server <ul><li>In this exercise, you do the following: </li></ul><ul><ul><li>Part I: Configure the Samba Client </li></ul></ul><ul><ul><li>Part II: Configure the Samba Server </li></ul></ul>
  73. 73. Manage Resources on the Network <ul><li>Objectives </li></ul><ul><ul><li>Network Information Service (NIS) </li></ul></ul><ul><ul><li>LDAP </li></ul></ul>
  74. 74. Network Information Service (NIS) <ul><li>Network Information Service basics </li></ul><ul><ul><li>Database system </li></ul></ul><ul><ul><li>Allows centralized administration of configuration files </li></ul></ul><ul><ul><li>Enables centralized user management and printer administration </li></ul></ul><ul><ul><li>Makes administration of large networks easier </li></ul></ul><ul><ul><li>NIS server stores files to distribute over the whole network in maps </li></ul></ul>
  75. 75. Network Information Service (NIS) (continued) <ul><li>NIS domain components </li></ul><ul><ul><li>Master server </li></ul></ul><ul><ul><ul><li>Stores all important configuration files distributed across the network </li></ul></ul></ul><ul><ul><ul><ul><li>And distributes them to slave servers </li></ul></ul></ul></ul><ul><ul><ul><li>Processes NIS clients’ requests </li></ul></ul></ul><ul><ul><li>Slave server </li></ul></ul><ul><ul><ul><li>Helps the master server process requests </li></ul></ul></ul><ul><ul><li>NIS clients </li></ul></ul><ul><ul><ul><li>Retrieve configuration files from the NIS server </li></ul></ul></ul>
  76. 76. Network Information Service (NIS) (continued)
  77. 77. Network Information Service (NIS) (continued) <ul><li>NIS configuration overview </li></ul><ul><ul><li>/etc/defaultdomain stores name of NIS domain </li></ul></ul><ul><ul><li>/etc/yp.conf stores NIS server to address </li></ul></ul><ul><ul><li>On a slave server </li></ul></ul><ul><ul><ul><li>First the local NIS server should be addressed </li></ul></ul></ul><ul><ul><ul><li>Then any other existing slave servers </li></ul></ul></ul><ul><ul><li>NIS client must be configured so it uses the NIS maps </li></ul></ul><ul><ul><ul><li>Instead of or in addition to the local configuration files </li></ul></ul></ul><ul><ul><ul><li>Modify configuration file /etc/nsswitch.conf </li></ul></ul></ul>
  78. 78. Network Information Service (NIS) (continued) <ul><li>How to configure a NIS master server with YaST </li></ul><ul><ul><li>Start YaST NIS Server module </li></ul></ul><ul><ul><li>Do one of the following: </li></ul></ul><ul><ul><ul><li>If no NIS server exists select Create NIS Master Server </li></ul></ul></ul><ul><ul><ul><li>If you already have a NIS master server select Create NIS Slave Server </li></ul></ul></ul><ul><ul><ul><li>Quit the NIS server setup </li></ul></ul></ul>
  79. 79. Network Information Service (NIS) (continued)
  80. 80. Network Information Service (NIS) (continued) <ul><li>How to configure a NIS master server with YaST (continued) </li></ul><ul><ul><li>Create a NIS Master Server </li></ul></ul>
  81. 81. Network Information Service (NIS) (continued)
  82. 82. Network Information Service (NIS) (continued)
  83. 83. Network Information Service (NIS) (continued)
  84. 84. Network Information Service (NIS) (continued) <ul><li>How to configure a NIS master server manually </li></ul><ul><ul><li>Make sure software packages are installed </li></ul></ul><ul><ul><li>Generate symbolic links to start NIS server automatically </li></ul></ul><ul><ul><li>Set NIS domain name </li></ul></ul><ul><ul><li>Check configuration files </li></ul></ul><ul><ul><li>Create NIS maps </li></ul></ul><ul><ul><li>Check additional configuration files </li></ul></ul>
  85. 85. Network Information Service (NIS) (continued) <ul><li>How to configure maps manually </li></ul><ul><ul><li>Makefile (/var/yp/Makefile) is evaluated </li></ul></ul><ul><ul><li>NIS domain name must be set </li></ul></ul><ul><ul><li>ypdomainname displays the domain name </li></ul></ul><ul><ul><li>ypdomainnam domain_name sets domain name </li></ul></ul><ul><ul><li>Create NIS maps with make </li></ul></ul><ul><ul><li>Makefile evaluates NIS domain names </li></ul></ul><ul><ul><ul><li>And creates a directory in /var/yp/ </li></ul></ul></ul><ul><ul><li>make –C /var/yp -s includes new user in NIS maps </li></ul></ul>
  86. 86. Network Information Service (NIS) (continued) <ul><li>How to configure a slave server on the master server </li></ul><ul><ul><li>Use YaST </li></ul></ul><ul><ul><li>Select Active Slave NIS server exists </li></ul></ul><ul><ul><li>Select Fast Map distribution </li></ul></ul><ul><ul><ul><li>To start the YP transfer daemon </li></ul></ul></ul><ul><ul><li>Slave servers entered in YaST are written to /var/yp/ypservers </li></ul></ul>
  87. 87. Network Information Service (NIS) (continued) <ul><li>How to configure a slave server only </li></ul><ul><ul><li>Start YaST NIS Server module </li></ul></ul><ul><ul><li>Select Create NIS Slave Server > Next </li></ul></ul><ul><ul><li>Package ypserv is needed on the slave server </li></ul></ul><ul><ul><li>Set symbolic links for starting in the corresponding runlevels </li></ul></ul><ul><ul><li>Slave server is given the name of the NIS domain </li></ul></ul><ul><ul><li>Decide if slave server should function as a NIS client </li></ul></ul><ul><ul><li>Slave server requests maps from the master server </li></ul></ul><ul><ul><li>Maps are also stored in /var/yp/NIS-domain-name/ </li></ul></ul>
  88. 88. Network Information Service (NIS) (continued) <ul><li>How to configure a NIS client with YaST </li></ul><ul><ul><li>Start YaST NIS Client module </li></ul></ul><ul><ul><li>Make sure Use NIS is selected </li></ul></ul><ul><ul><li>Do one of the following: </li></ul></ul><ul><ul><ul><li>Select Automatic Setup (via DHCP) </li></ul></ul></ul><ul><ul><ul><li>Select Static Setup </li></ul></ul></ul><ul><ul><li>Enter static configuration values (conditional) </li></ul></ul><ul><ul><li>Select Start Automounter (conditional) </li></ul></ul><ul><ul><li>Access additional configuration options </li></ul></ul><ul><ul><li>Save configuration settings </li></ul></ul>
  89. 89. Network Information Service (NIS) (continued)
  90. 90. Network Information Service (NIS) (continued) <ul><li>How to configure NIS users with YaST </li></ul><ul><ul><li>Create a directory for NIS network users </li></ul></ul><ul><ul><li>Start YaST Edit and create users module </li></ul></ul><ul><ul><li>Select Set Filter; then select Local Users </li></ul></ul><ul><ul><li>Create a new user by selecting Add </li></ul></ul><ul><ul><li>Enter a full user name, user login ID, and password </li></ul></ul><ul><ul><li>Select Details </li></ul></ul><ul><ul><li>Enter the home directory for the user </li></ul></ul><ul><ul><li>Add the user by selecting Create </li></ul></ul>
  91. 91. Network Information Service (NIS) (continued)
  92. 92. Network Information Service (NIS) (continued)
  93. 93. Network Information Service (NIS) (continued)
  94. 94. Network Information Service (NIS) (continued) <ul><li>How to configure NIS users with YaST (continued) </li></ul><ul><ul><li>With the new user selected, select Set Filter </li></ul></ul><ul><ul><ul><li>Then select NIS Users </li></ul></ul></ul><ul><ul><li>Save changes </li></ul></ul><ul><ul><li>Open a terminal window </li></ul></ul><ul><ul><li>Change to the directory /var/yp/ </li></ul></ul><ul><ul><li>Update the NIS maps by entering make </li></ul></ul><ul><ul><li>From Yast Control Center, select Security and Users > Edit and Create Users </li></ul></ul><ul><ul><li>Select Set Filter > NIS Users </li></ul></ul>
  95. 95. Network Information Service (NIS) (continued) <ul><li>NIS security considerations </li></ul><ul><ul><li>Configure access restriction in file /var/yp/securenets </li></ul></ul><ul><ul><li>Networks that require access to the NIS server </li></ul></ul><ul><ul><ul><li>Must be listed in this file </li></ul></ul></ul><ul><ul><li>Entries for individual computers can also be made </li></ul></ul><ul><ul><ul><li>With the keyword host </li></ul></ul></ul><ul><ul><li>Only IP addresses are valid in /var/yp/securenets </li></ul></ul>
  96. 96. Network Information Service (NIS) (continued) <ul><li>NIS utilities </li></ul><ul><ul><li>/bin/ypdomainname </li></ul></ul><ul><ul><ul><li>Displays the name of the current NIS domain </li></ul></ul></ul><ul><ul><ul><li>Sets a new domain name </li></ul></ul></ul><ul><ul><li>/usr/bin/ypwhich </li></ul></ul><ul><ul><ul><li>Displays the NIS server used by the client </li></ul></ul></ul><ul><ul><ul><li>Queries NIS client on other machines for the server addressed </li></ul></ul></ul><ul><ul><li>/usr/bin/ypcat </li></ul></ul><ul><ul><ul><li>Displays the contents of a NIS database file (map) </li></ul></ul></ul>
  97. 97. Network Information Service (NIS) (continued) <ul><li>NIS utilities (continued) </li></ul><ul><ul><li>/usr/bin/ypmatch </li></ul></ul><ul><ul><ul><li>Queries the key field of a NIS map and has the corresponding entry for the field displayed </li></ul></ul></ul><ul><ul><li>/usr/bin/yppasswd </li></ul></ul><ul><ul><ul><li>Changes the password of the user on the NIS server </li></ul></ul></ul><ul><ul><li>/usr/bin/yppoll </li></ul></ul><ul><ul><ul><li>Displays ID number of a NIS map used by the NIS server </li></ul></ul></ul>
  98. 98. Network Information Service (NIS) (continued)
  99. 99. Exercise 8-4 Enable Network Information Service (NIS) on Your Network <ul><li>In this exercise, you do the following: </li></ul><ul><ul><li>Part I: Configure a NIS Server YaST </li></ul></ul><ul><ul><li>Part II: Create a NIS User </li></ul></ul><ul><ul><li>Part III: Update the NIS Maps </li></ul></ul><ul><ul><li>Part IV: Verify a Local NIS Configuration </li></ul></ul><ul><ul><li>Part V: Prepare for NIS Network Users </li></ul></ul><ul><ul><li>Part VI: Configure the NIS Client Using YaST </li></ul></ul>
  100. 100. LDAP <ul><li>LDAP (Lightweight Directory Access Protocol) </li></ul><ul><ul><li>Internet communications protocol </li></ul></ul><ul><ul><li>Lets client applications access Directory information </li></ul></ul><ul><ul><li>Based on the X.500 Directory Access Protocol (DAP) </li></ul></ul><ul><ul><li>OpenLDAP package contains </li></ul></ul><ul><ul><ul><li>slapd </li></ul></ul></ul><ul><ul><ul><li>slurpd </li></ul></ul></ul><ul><ul><ul><li>slapcat, slapadd, slapindex </li></ul></ul></ul>
  101. 101. LDAP (continued) <ul><li>LDAP versus NIS </li></ul><ul><ul><li>NIS is only designed for Linux/UNIX platforms </li></ul></ul><ul><ul><li>LDAP service is not restricted to pure Linux/UNIX networks </li></ul></ul><ul><ul><li>LDAP can be applied to any centrally administered data structure </li></ul></ul><ul><ul><ul><li>Replacement for NIS </li></ul></ul></ul><ul><ul><ul><li>Mail routing (postfix, sendmail) </li></ul></ul></ul><ul><ul><ul><li>Address books for mail clients </li></ul></ul></ul><ul><ul><ul><li>Administration of zone descriptions for a BIND9 name server </li></ul></ul></ul>
  102. 102. LDAP (continued) <ul><li>Structure of an LDAP directory tree </li></ul><ul><ul><li>Directory information tree (DIT) </li></ul></ul><ul><ul><ul><li>LDAP directory tree </li></ul></ul></ul><ul><ul><li>Distinguished name or DN </li></ul></ul><ul><ul><ul><li>Complete path to a desired entry (object) </li></ul></ul></ul><ul><ul><li>Relative distinguished name or RDN </li></ul></ul><ul><ul><ul><li>Single nodes along the path to the entry </li></ul></ul></ul><ul><ul><li>Types of objects </li></ul></ul><ul><ul><ul><li>container </li></ul></ul></ul><ul><ul><ul><li>leaf </li></ul></ul></ul>
  103. 103. LDAP (continued)
  104. 104. LDAP (continued) <ul><li>Structure of an LDAP directory tree (continued) </li></ul><ul><ul><li>Schema </li></ul></ul><ul><ul><ul><li>Definition of which types of objects can be stored in DIT </li></ul></ul></ul><ul><ul><li>Object class </li></ul></ul><ul><ul><ul><li>Defines what attributes the object must or can be assigned </li></ul></ul></ul>
  105. 105. LDAP (continued) <ul><li>How to configure an LDAP server with YaST </li></ul><ul><ul><li>Start the YaST LDAP Server module </li></ul></ul><ul><ul><li>Start the LDAP server by selecting Yes </li></ul></ul><ul><ul><li>Configure the LDAP server by selecting Configure </li></ul></ul><ul><ul><li>View the configuration settings </li></ul></ul><ul><ul><li>LDAP settings categories </li></ul></ul><ul><ul><li>Save the LDAP server setting by selecting Finish </li></ul></ul><ul><ul><li>Close the YaST Control Center (optional) </li></ul></ul>
  106. 106. LDAP (continued)
  107. 107. LDAP (continued)
  108. 108. LDAP (continued) <ul><li>How to configure an LDAP client with YaST </li></ul><ul><ul><li>Start the YaST LDAP Client module </li></ul></ul><ul><ul><li>Enable user authentication with an LDAP server </li></ul></ul><ul><ul><li>Enter the distinguished name of the search base </li></ul></ul><ul><ul><li>Enter the IP address of the LDAP server </li></ul></ul><ul><ul><li>Select LDAP TLS/SSL (conditional) </li></ul></ul><ul><ul><li>Select LDAP version 2 (conditional) </li></ul></ul><ul><ul><li>Configure advanced LDAP settings </li></ul></ul><ul><ul><li>Automatically mount directories on remote hosts </li></ul></ul><ul><ul><li>Save the settings </li></ul></ul>
  109. 109. LDAP (continued)
  110. 110. LDAP (continued) <ul><li>How to configure users for LDAP authentication </li></ul><ul><ul><li>Start the YaST Edit and create users module </li></ul></ul><ul><ul><li>Select Set Filter > Local Users </li></ul></ul><ul><ul><li>From the user list, select a user; then select Edit </li></ul></ul><ul><ul><li>Select Details </li></ul></ul><ul><ul><li>Continue by selecting Next </li></ul></ul><ul><ul><li>Edit an attribute value </li></ul></ul><ul><ul><li>When you finish, continue by selecting Next </li></ul></ul>
  111. 111. LDAP (continued)
  112. 112. LDAP (continued)
  113. 113. Summary <ul><li>SLES uses the CUPS printing system </li></ul><ul><li>Configure CUPS with: </li></ul><ul><ul><li>YaST </li></ul></ul><ul><ul><li>lpadmin </li></ul></ul><ul><ul><li>CUPS Web Administration tool </li></ul></ul><ul><ul><li>Modifying configuration files </li></ul></ul><ul><li>CUPS log files </li></ul><ul><ul><li>/var/log/cups/error_log </li></ul></ul><ul><ul><li>/var/log/cups/access_log </li></ul></ul><ul><li>Print jobs are sent to a queue directory </li></ul>
  114. 114. Summary (continued) <ul><li>lp and lpr commands </li></ul><ul><ul><li>May be used to create print jobs </li></ul></ul><ul><li>lpstat or lpq commands </li></ul><ul><ul><li>Display print jobs in the print queue </li></ul></ul><ul><li>lpoptions command </li></ul><ul><ul><li>Modifies print options </li></ul></ul><ul><li>NFS </li></ul><ul><ul><li>Used to share files amongst Linux and UNIX </li></ul></ul><ul><li>Samba </li></ul><ul><ul><li>Shares files between Linux, UNIX, and Windows </li></ul></ul>
  115. 115. Summary (continued) <ul><li>NIS is unique to UNIX and Linux operating systems </li></ul><ul><li>NIS clients obtain information from a NIS master server or NIS slave servers </li></ul><ul><li>LDAP service provides the same functionality as NIS </li></ul><ul><ul><li>But is supported by nearly all operating systems </li></ul></ul><ul><li>LDAP resources are organized into a directory information tree </li></ul><ul><li>YaST may be used to configure LDAP </li></ul>

×