IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

HOWTOs

Search Howtos :Match :

3. Printing To Windows PCs

3.1. Connecting To Windows

Figure 2. Network Printing

SMB and CIFS are the Windows file and printer sharing protocols. We use Samba to speak to the Windows PCs using these protocols. Before configuring CUPS we should make sure we can connect to the Windows PC with smbclient, the Samba SMB/CIFS client Figure 2.

The following is an example of creating a connection to a Windows PC:
/usr/bin/smbclient -L rice -U fred

added interface ip=10.6.7.234 bcast=10.6.7.255 nmask=255.255.255.0
Got a positive name query response from 10.6.7.8 ( 10.6.7.8 )
Password: (not shown)

Sharename  Type  Comment
PRINTER$   Disk
INKJET     Printer
STUFF      Disk
IPC$       IPC    Remote Inter Process Communication 

The command shown asks for a list of shares on a Windows PC named "rice", with the user id "fred". The result shows a printer named "INKJET".

If Windows naming service is unavailable you will need to specify the IP address of the Windows PC with the -I switch as in:
/usr/bin/smbclient -I 10.6.7.8 -L rice -N

For more information see the Samba documentation about smbclient usage.

3.2. CUPS Configuration

Once you have found a Windows printer you may configure CUPS. First verify that your installation of CUPS has the smb backend with the following command:
ls -l /usr/lib/cups/backend/smb

If this file does not exist create it by issuing the following:
ln -s `which smbspool` /usr/lib/cups/backend/smb

The following is an example of setting up the printer shown above. You will have to become root or use sudo to execute these commands:
/usr/sbin/lpadmin -p RicePrinter -v smb://fred:mypass at rice/INKJET -P /root/inkjet.ppd
/usr/bin/enable RicePrinter
/usr/sbin/accept RicePrinter
/usr/sbin/lpadmin -d RicePrinter

As mentioned above, bash has a builtin command called enable, so bash users must use the full path (/usr/bin/enable) to enable printers.

The "lpadmin" command sets up a the shared Windows printer by giving the username, password, netbios name and printer name as a single parameter. See Section 2.3 for a further explanation of the commands above.

Your printer is now ready to test. Send a file to the printer with the lp command followed by a filename, or by printing a document from within an application.

Search Howtos :Match :
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
Mutt 1.5.19
Small but very powerful text-based mail client.
Galculator 1.3.2
GTK 2 based scientific calculator
BlueFish 1.3.1
GTK HTML editor
Samba 3.3.0rc2
Provides file and print services to SMB/CIFS clients
WebGUI 7.5.38
A fully featured content management system.
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info