Build a samba server sharing printer in linux

Source: Internet
Author: User
Tags dmesg
Article Title: Create a samba server sharing printer in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

Finally, we installed the lab printer on a broken computer with archlinux installed. Other siblings in the lab use windows, while I use both windows and linux. In order to allow everyone to use printers, I have configured the printer and printer sharing on the samba server, and each client naturally connects to this shared printer. As an example, printing and sharing between linux and windows will not be involved, but I think it will be helpful for readers who need to configure printing and sharing when the printer is installed in linux. For myself, the most important thing is to leave a memo in writing this article.

Configure the server-side printer and Its Sharing:

1. the cups system is used to set up the printer. If you are using ubuntu or other silly linux systems, cups should have been installed and started by default, all you need to do is configure it. Skip to step 2. I only want to talk about the releases I have used: gentoo and archlinux. The advantages and disadvantages of these two releases will not be discussed here. They can only be said to be excellent releases. For gentoo users, installing and starting cups is simple:

# Emerge-av cups
# Rc-update-a cupsd default

If you use archlinux:

# Pacman-S cups
# Vim (or other editors)/etc/rc. conf
Add cups to the DAEMONS line.

2. now, we can configure and test our printer. I am using a usb interface printer of the HPLaserJet1200. For the newer kernel (using the udev system ), the printer can be identified immediately after it is plugged in, unless your kernel does not support usb !, If you want to see if it is recognized, you can use the following command:

# Lsusb (pci-utils software package needs to be installed)
Or view dmesg:
# Dmesg | grep usb
If it is just inserted into the computer, it can also be like this:
# Dmesg | tail

If your printer uses other interfaces that are not supported by the system kernel, obtain Kernel support (loading related modules or directly compiling them into the kernel) first ), you may need other help.

Now we need to configure cups. cups provides a web-based configuration interface, which is too convenient for desktop users. If you cannot install the desktop system, I'm sorry, it is not helpful for the time being. Make sure that the cups service process is started. Enter localhost: 631 in the browser (whatever you like, I will use firefox) and the cups configuration interface will be started! I'm sorry for those who are not familiar with English, because this interface does not seem to have been written into Chinese.

Click "add printer" to add a printer. after entering the next page, enter "name", "location", and "description" to fill in the blanks. In fact, they can all be left blank, of course, name is the name of the printer. Just select a professional and memorable name. location describes where the printer is (just hanging on yourself, so I will write localhost ), discription is the description of the printer. It can be empty. Click "continue" to go to the next page.

In this step, select the printer. If you have found your printer according to the previous instructions, click the drop-down menu, there must be one of your printers. Choose it and then continue.

This step is to select the driver. Generally, the system already has your printer driver and recommended a few for you. Select the most similar one according to the recommended one (you can't change it back ), if your printer driver is not provided, you need to go here and check, search for your printer driver, download the corresponding ppd file, store it, and Click browse... manually add a driver. After adding the driver, the next step is "add printer"

Enter the root user name and password, and press enter. Congratulations! The printer has been added successfully! At this time, you should print a test page to see if the printer is not working.

[1] [2] Next page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.