Archive for October, 2007

714 Part V . Running Servers After your (Web hosting resellers)

Friday, October 12th, 2007

714 Part V . Running Servers After your shared printer appears in the window, configure a pointer to that printer by opening (double-clicking) the printer icon. A message tells you that you must set up the printer before you can use it. Click Yes to proceed to configure the printer for local use. The Add Printer Wizard appears. Answer the questions that ask you how you intend to use the printer, and add the appropriate drivers. When you are done, the printer appears in your printer window. Another way to configure an SMB printer from a Windows XP operating system is to go to Start.Printers and Faxes. In the Printers and Faxes window that appears, click the Add a Printer icon in the upper-left portion of the window, and then select Network Printer from the first window. From there you can browse and/or configure your SMB printer. Summary Providing networked printing services is an essential efficiency on today s business network. With the use of a few network-attached devices, you can focus your printer spending on a few high-quality devices that multiple users can share instead of numerous lower-cost devices. In addition, a centrally located printer can make it easier to maintain the printer, while still enabling everyone to get his or her printing jobs done. The default printing service in nearly every major Linux distribution today is the Common UNIX Printing Service (CUPS). Any Linux system that includes CUPS offers the CUPS Web-based administrative interface for configuring CUPS printing. It also offers configuration files in the /etc/cups directory for configuring printers and the CUPS service (cupsd daemon). In Fedora and other Red Hat Linux systems, you can configure your printer with the Printer Configuration windows available in both K Desktop and GNOME environments. A variety of filters makes it possible to print to different kinds of printers, as well as to printers that are connected to computers on the network. You can set up your computer as a Linux print server, and you can also have your computer emulate an SMB (Windows) print server. After your network is configured properly and a local printer is installed, sharing that printer over the network as a UNIX or SMB print server is not very complicated. . . .
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Free web space - Chapter 26 . Running a Print Server 713

Thursday, October 11th, 2007

Chapter 26 . Running a Print Server 713 These example settings are the result of configuring Samba from the Samba Server Configuration window in Fedora Linux. The lines show that printers from /etc/ printcap were loaded and that the CUPS service is being used. Password encryption is on, and the /etc/samba/smbpasswd file stores the encrypted passwords. Because password sync is on, each user s Samba password is synchronized with the user s local UNIX password. The last few lines are the actual printers definition. It shows that users can print to all printers (printable = yes). Setting Up SMB Clients Chances are good that if you re configuring a Samba printer on your Linux computer, you want to share it with Windows clients. If Samba is set up properly on your computer and the client computers can reach you over the network, their finding and using your printer should be fairly straightforward. The first place a client computer looks for your shared Samba printer is in Network Neighborhood (or My Network Places, for Windows 2000). From the Windows 9x desktop, double-click the Network Neighborhood icon. (From Windows 2000 or XP, double-click the My Network Places icon.) The name of your host computer (the NetBIOS name, which is probably also your TCP/IP name) appears on the screen or within a workgroup folder on the screen. Open the icon that represents your computer. The window that opens shows your shared printers and folders. If your computer s icon doesn t appear in Network Neighborhood or My Network Places, try using the Search window. From Windows XP, choose Start.Search. Computer or People.A Computer on the Network. Type your computer s name into the Computer Name box and click Search. Double-click your computer in the Search window results panel. A window displaying the shared printers and folders from your computer appears (see Figure 26-4). Figure 26-4: You can search for your computer s printers.
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

712 Part V . Running (Make my own web site) Servers Now you

Wednesday, October 10th, 2007

712 Part V . Running Servers Now you can configure other computers to use your printer, as described in the Setting Up Printers section of this chapter. If you try to print from another computer and it doesn t work, here are a few troubleshooting tips: . Open your firewall. If you have a restrictive firewall, it may not permit printing. You must enable access to port 513 (UDP and TCP) to allow access to printing on your computer. See Chapter 17 for information on configuring your firewall. . Enable LPD-style printing. Certain applications may require an older LPD-style printing service to print on your shared printer. To enable LPD-style printing on your CUPS server, you must turn on the cups-lpd service. Most Linux distributions that include CUPS should also include cups-lpd. In Fedora and other Red Hat systems, type chkconfig cups-lpd on as root user. Then restart the xinetd daemon (service xinetd restart). . Check names and addresses. Make sure that you entered your computer s name and print queue properly when you configured it on the other computer. Try using the IP address instead of the host name. (If that works, it indicates a DNS name resolution problem.) Running a tool such as ethereal enables you to see where the transaction fails. Access changes to your shared printer are made in the /etc/cups/cupsd.conf file. Configuring a Shared Samba Printer Your Linux printers can be configured as shared SMB printers. To share your printer as though it were a Samba (SMB) printer, simply configure basic Samba server settings as described in Chapter 27. All your printers should be shared on your local network by default. The next section shows what the resulting settings look like and how you might want to change them. Understanding smb.conf for Printing When you configure Samba, the /etc/samba/smb.conf file is constructed to enable all of your configured printers to be shared. Here are a few lines from the smb.conf file that relate to printer sharing: printcap name = /etc/printcap load printers = yes printing = cups encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd unix password sync = Yes [printers] comment = All Printers path = /var/spool/samba browseable = yes writeable = no printable = yes
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Web server certificate - Chapter 26 . Running a Print Server 711

Tuesday, October 9th, 2007

Chapter 26 . Running a Print Server 711 Order Deny,Allow Deny From All Allow From 127.0.0.1 AuthType None Allow from All Instead of Allow from All, you can allow a particular network (for example, 10.0.0.0/255.255.255.0), network interface (Allow from @IF(eth0)), or individual IP address (Allow from 10.0.0.1). On Fedora and other Red Hat Linux systems, it s best to set up your printer as a shared printer using the Printer Configuration window. Here s how: 1. From the main menu, select System Settings.Printing. The Printer Configuration window appears. 2. Click the name of the printer you want to share. (If the printer is not yet configured, refer to the Setting Up Printers section earlier in this chapter.) 3. Select Action.Sharing. The Sharing Properties window appears. 4. On the Queue tab, click the check box next to This Queue Is Available to Other Computers. The words All hosts should appear in the Allowed Hosts box, indicating that all computers that can access your computer from the network can access the selected printer. If you don t want the printer accessible to everyone, you can always click Edit and change the configuration to share your printer in one of the following ways: All hosts The default, where any computer can print on the printer. Network devices If you have a LAN connection, you can select Network Devices and click the interface (such as eth0) to allow computers on the LAN to access your printer. This is a good choice if, for example, your computer is acting as a router. You can allow computers on your LAN to access your printer but not allow computers from the Internet to use the printer. Network address You can restrict access to your printer to a select set of network addresses. The address pool can be indicated with a CIDR address (for example, a CIDR equivalent for a class C netmask of 255.255.255.0 is /24). Single IP address You can indicate that a particular IP address can access your printer. Repeat this step to add more than a single IP address. 5. If you want only selected hosts to access your printer, click Remove (to remove the All Hosts line), and then click Add. 6. Click OK to continue. 7. In the Sharing Properties window, click OK. 8. From the Printer Configuration window, click Apply to apply the changes.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Affordable web hosting - 710 Part V . Running Servers The root

Monday, October 8th, 2007

710 Part V . Running Servers The root user can remove all the print jobs for a specific user by indicating that user on the lprm command line. For example, to remove all print jobs for the user named mike, the root user types the following: $ lprm mike To remove an individual print job from the queue, indicate its job number on the lprm command line. To find the job number, type the lpq command. Here s what the output of that command may look like: $ lpq printer is ready and printing Rank Owner Job Files Total Size Time active root 133 /home/jake/pr1 467 2 root 197 /home/jake/mydoc 23948 The output shows two printable jobs waiting in the queue. (The printer is ready and printing the job listed as active.) Under the Job column, you can see the job number associated with each document. To remove the first print job, type the following: # lprm 133 Configuring Print Servers You ve configured a printer so that you and the other users on your computer can print to it. Now you want to share that printer with other people in your home, school, or office. Basically, that means configuring the printer as a print server. The printers configured on your Linux system can be shared in different ways with other computers on your network. Not only can your computer act as a Linux print server (by configuring CUPS); it can look to client computers such as an SMB print server. After a local printer is attached to your Linux system and your computer is connected to your local network, you can use the procedures in this section to share it with client computers using a Linux (UNIX) or SMB interface. Configuring a Shared CUPS Printer Making the local printer added to your Linux computer available to other computers on your network is fairly easy. If a TCP/IP network connection exists between the computers sharing the printer, you simply grant permission to all hosts, individual hosts, or users from remote hosts to access your computer s printing service. To manually configure a printer entry in the /etc/cups/cupsd.conf file to accept print jobs from all other computers, add an Allow from All line. The following example from a cupsd.conf entry earlier in this chapter demonstrates what the new entry would look like:
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Chapter 26 . Running (Web file server) a Print Server 709

Sunday, October 7th, 2007

Chapter 26 . Running a Print Server 709 export PRINTER=lp3 To override the default printer, specify a particular printer on the lpr command line. The following example uses the -P option to select a different printer: $ lpr -P canyonps doc1.ps The lpr command has a variety of options that enable lpr to interpret and format several different types of documents. These include -# num, where num is replaced by the number of copies to print (from 1 to 100) and -l (which causes a document to be sent in raw mode, presuming that the document has already been formatted). To learn more options to lpr, type man lpr. Listing Status with lpc Use the lpc command to list the status of your printers. Here is an example: $ lpc status hp: printer is on device parallel speed -1 queuing is enabled printing is disabled no entries daemon present deskjet_5550: printer is on device /dev/null speed -1 queuing is enabled printing is disabled no entries daemon present This output shows two active printers. The first (hp) is connected to your parallel port. The second (deskjet_5550) is a network printer (shown as /dev/null). The hp printer is currently disabled (offline), although the queue is enabled so people can continue to send jobs to the printer. Removing Print Jobs with lprm Users can remove their own print jobs from the queue with the lprm command. Used alone on the command line, lprm removes all the user s print jobs from the default printer. To remove jobs from a specific printer, use the -P option, as follows: $ lprm -P lp0 To remove all print jobs for the current user, type the following: $ lprm -
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

708 Part V . Running Servers The first (Cheap web hosting)

Saturday, October 6th, 2007

708 Part V . Running Servers The first three examples show the form for local printers (parallel, serial, and scsi). The other examples are for remote hosts. In each case, hostname can be the host s name or IP address. Port numbers or paths identify the locations of each printer on the host. If you find that you are not able to print because a particular printer driver is not supported in CUPS, you can set up your printer to accept jobs in raw mode. This can work well if you are printing from Windows clients that have the correct print drivers installed. To enable raw printing in CUPS, uncomment the following line in the /etc/cups/mime.types file in Linux: application/octet-stream And uncomment the following line in the /etc/cups/mime.convs file: application/octet-stream application/vnd.cups-raw 0 - After that, you can print files as raw data to your printers without using the -oraw option to print commands. Using Printing Commands To remain backward compatible with older UNIX and Linux printing facilities, CUPS supports many of the old commands for working with printing. Most command-line printing with CUPS can be performed with the lpr command. Word-processing applications such as StarOffice, OpenOffice, and AbiWord are set up to use this facility for printing. You can use the Printer Configuration window to define the filters needed for each printer so that the text can be formatted properly. Options to the lpr command can add filters to properly process the text. Other commands for managing printed documents include lpq (for viewing the contents of print queues), lprm (for removing print jobs from the queue), and lpc (for controlling printers). Printing with lpr You can use the lpr command to print documents to both local and remote printers. Document files can be either added to the end of the lpr command line or directed to the lpr command using a pipe (|). Here s an example of a simple lpr command: $ lpr doc1.ps When you specify just a document file with lpr, output is directed to the default printer. As an individual user, you can change the default printer by setting the value of the PRINTER variable. Typically, you add the PRINTER variable to one of your startup files, such as $HOME/.bashrc. Adding the following line to your .bashrc file, for example, sets your default printer to lp3: Tip
Please visit our professional web hosting services to find out about cheap and reliable webhost service that will surely answer all your demands.

Chapter 26 . Running (Web hosting resellers) a Print Server 707

Friday, October 5th, 2007

Chapter 26 . Running a Print Server 707 In Gentoo Linux, you use the add option of the rc-update command to have the CUPS service start at each reboot and run the cupsd runlevel script to start it immediately. For example, type the following as root user: # rc-update add cupsd default # /etc/init.d/cupsd start Most Linux systems have similar ways of starting the CUPS service. You may need to poke around to see how CUPS starts on the distribution you are using. Configuring CUPS Printer Options Manually If your Linux distribution doesn t have a graphical means of configuring CUPS, you can edit configuration files directly. For example, when a new printer is created from the Printer Configuration window, it is defined in the /etc/cups/printers.conf file. Here is what a printer entry looks like: Info Created by system-config-printer 0.6.x DeviceURI parallel:/dev/lp0 Location HP LaserJet 2100M in hall closet State Idle Accepting Yes JobSheets none none QuotaPeriod 0 PageLimit 0 KLimit 0 This is an example of a local printer that serves as the default printer for the local system. The most interesting information relates to DeviceURI, which shows that the printer is connected to parallel port /dev/lp0. The state is Idle (ready to accept printer jobs), and the Accepting value is Yes (the printer is accepting print jobs by default). The DeviceURI has several ways to identify the device name of a printer, reflecting where the printer is connected. Here are some examples listed in the printers .conf file: DeviceURI parallel:/dev/plp DeviceURI serial:/dev/ttyd1?baud=38400+size=8+parity=none+flow=soft DeviceURI scsi:/dev/scsi/sc1d6l0 DeviceURI socket://hostname:port DeviceURI tftp://hostname/path DeviceURI ftp://hostname/path DeviceURI http://hostname[:port]/path DeviceURI ipp://hostname/path DeviceURI smb://hostname/printer
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Free web hosting services - 706 Part V . Running Servers To enable

Thursday, October 4th, 2007

706 Part V . Running Servers To enable Web-based CUPS administration, the cupsd daemon listens on port 631 for all network interfaces to your computer based on this entry: Listen *:631. By turning on BrowseRelay (it s off by default), you can allow CUPS browse information to be passed among two or more networks. The source-address and destination-address can be individual IP addresses or can represent network numbers: BrowseRelay source-address destination-address This is a good way to enable users on several connected LANs to discover and use printers on other nearby LANs. You can allow or deny access to different features of the CUPS server. An access definition for a CUPS printer (created from the Printer Configuration window) might appear as follows: Order Deny,Allow Deny From All Allow From 127.0.0.1 AuthType None Here, printing to the ns1-hp1 printer is allowed only for users on the local host (127.0.0.1). No password is needed (AuthType None). To allow access to the administration tool, CUPS must be configured to prompt for a password (AuthType Basic). Starting the CUPS Server For Linux systems that use SystemV-style startup scripts (such as Fedora, RHEL, and SUSE), starting and shutting down the CUPS print service is pretty easy. Use the chkconfig command to turn on CUPS so it starts at each reboot. Run the cups startup script to have the CUPS service start immediately. Type the following as root user: # chkconfig cupsd on # /etc/init.d/cups start If the CUPS service was already running, you should use restart instead of start. Using the restart option is also a good way to reread any configuration options you may have changed in the cupsd.conf file. Other Linux systems vary in how they start up the CUPS service. For example, in Slackware, you can turn on CUPS printing permanently by simply making the rc.cups script executable and then turn it on immediately by executing it (typing the following as root user): # chmod 755 /etc/rc.d/rc.cups # /etc/rc.d/rc.cups start
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Chapter 26 . Running a (Apache web server tutorial) Print Server 705

Wednesday, October 3rd, 2007

Chapter 26 . Running a Print Server 705 Working with CUPS Printing Tools such as CUPS Web-based Administration and Red Hat s Printer Configuration window effectively hide the underlying CUPS facility. There may be times, however, when you want to work directly with the tools and configuration files that come with CUPS. The following sections describe how to use some special CUPS features. Configuring the CUPS Server (cupsd.conf) The cupsd daemon process listens for requests to your CUPS print server and responds to those requests based on settings in the /etc/cups/cupsd.conf file. The configuration variables in cupsd.conf file are in the same form as those in the Apache configuration file (httpd.conf). Red Hat s Printer Configuration window adds access information to the cupsd.conf file. For other Linux systems, you may need to configure the cupsd.conf file manually. You can step through the cupsd.conf file to further tune your CUPS server. Let s take a look at some of the settings in the cupsd.conf file. No classification is set by default. With the classification set to topsecret, you can have Top Secret displayed on all pages that go through the print server: Classification topsecret Other classifications you can substitute for topsecret include: classified, confidential, secret, and unclassified. The ServerCertificate and ServerKey lines (commented out by default) can be set up to indicate where the certificate and key are stored, respectively: ServerCertificate /etc/cups/ssl/server.crt ServerKey /etc/cups/ssl/server.key Activate these two lines if you want to do encrypted connections. Then add your certificate and key to the files noted. Browsing is the feature whereby you broadcast information about your printer on your local network and listen for other print servers information. Browsing is on by default only for the local host (@LOCAL). You can allow CUPS browser information (BrowseAllow) for additional selected addresses. Browsing information is broadcast, by default, on address 255.255.255.255. Here s how these defaults appear in the cupsd.conf file: Browsing On BrowseProtocols cups BrowseOrder Deny,Allow BrowseAllow from @LOCAL BrowseAddress 255.255.255.255 Listen *:631
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.