Printing to Windows Printers with CUPS and Samba

Hi All,

 Not sure if this is the correct way to enable printing via Samba from the CUPS on OpenSolaris but it works for me.

 Configure Samba on your system, we need smb.conf in /etc/sfw

 svcadm enable swat

 http://localhost:901/

 Configure and save

 Should be something like this:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2008/08/20 22:55:37

[global]
    workgroup = CLACK
    map to guest = Bad User
    smb passwd file = /usr/sfw/smbpasswd
    passdb backend = smbpasswd:/etc/sfw/smbpasswd
    logon path = \\\\%L\\profiles\\.msprofile
    logon drive = P:
    logon home = \\\\%L\\%U\\.9xprofile
    os level = 60
    ldap idmap suffix = ou=Idmap
    ldap machine suffix = ou=Computers
    ldap suffix = dc=example,dc=com
    ldap ssl = no
    admin users = dclack, root
    read list = dclack, root
    write list = dclack, root
    printer admin = @ntadmin, root, administrator
    cups options = raw

[homes]
    comment = Home Directories
    valid users = %S
    read only = No
    inherit permissions = Yes
    browseable = No

[profiles]
    comment = Network Profiles Service
    path = %H
    read only = No
    create mask = 0600
    directory mask = 0700
    store dos attributes = Yes

[users]
    comment = All users
    path = /home
    read only = No
    inherit permissions = Yes
    veto files = /aquota.user/groups/shares/

[groups]
    comment = All groups
    path = /home/groups
    read only = No
    inherit permissions = Yes

[pdf]
    comment = PDF creator
    path = /var/tmp
    create mask = 0600
    printable = Yes

[printers]
    comment = All Printers
    path = /var/tmp
    create mask = 0600
    printable = Yes
    browseable = No

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/drivers
    write list = @ntadmin, root
    force group = ntadmin
    create mask = 0664
    directory mask = 0775

[d_storage]
    comment = /share on os-asus
    path = /share
    valid users = dclack, root
    read only = No
    guest ok = Yes

 I always create a directory on all my systems called /share, on UFS I put it on a separate slice, I keep all the source code and drivers for the specific system in this slice, if I need to reinstall the OS, I can tell the installer to preserve this slice.

 As root

 svcadm enable samba

 cd /usr/lib/cups/backend

 ln -s /usr/sfw/bin/smbspool smb

 Start up cups -

 print-service -s cups

 reference: http://opensolaris.org/os/community/printing/Documentation/cupsprint/

 Configure printer on Windows system via CUPS web interface

 http://localhost:631/

 add printer

 Name the new printer, continue

 Next screen as drop down, select "Windows Printer via Samba"

 URL looks like smb://"Windows user":"Windows user password"@"windows server"/"Windows Shared Printer"

 Next screen allows you to select the printer type.

 Printer should show up in all desktop applications

 I add my Windows Server IP address and name into the /etc/hosts file


 


Comments:

Working for Sun, you probably already know this, but for the benefit of your readers --

under System V, the "share" directory is a platform independent, NFS-exported read-only directory (read-write on the system itself).

EXAMPLES
/opt/orcl/share
/usr/share

To create a System V compliant 'share', one would create something like /export/space/, then share that via NFS in /etc/dfs/dfstab. The same /export/space/ would be used for sharing via CIFS as well.

In general, filesystems intended to be exported as a resource on the network should be located under /export. That's what /export is for.

Posted by UX-admin on October 11, 2008 at 12:55 AM PDT #

Yes, you are correct, I've just got into a habit (good or bad), of creating a UFS slice called /share
I test so much weird stuff, that I kill my systems frequently, at least I can save all my source and drivers specific to the systems I'm testing.

I usually have 10+ desktops/servers and 8+ laptops that I'm reinstalling with every new build of Solaris X86 and OpenSolaris.

Posted by Hacker on October 12, 2008 at 05:14 AM PDT #

Perhaps packaging, JumpStart(TM) and Flash(TM) technologies can help you (;-)

For example, all of the software I use is packaged, so only the user data in my home account needs to be backed up. Since everything else comes onto the system via packages, there is never a need to preserve anything on the OS side. The systems are flashed, then eventually the additional components (packages) are installed, and the content of the home directory is copied from tape or DVD.

In that sense, the OS can never be "killed" or damaged, since a reflash via JumpStart makes sure that all systems are identical. The OS becomes nothing more than a commodity, and never needs to be backed up.

Posted by UX-admin on October 12, 2008 at 04:35 PM PDT #

Hi,

Yes, I have /export/home back'd up to external USB.

My job is to work out how to install on any systems our Solaris X86 OEM's can throw at me.

I also have to know how to fix them when they have broken them, just like I did last night with my B95 Acer C90S.

I just got one letter wrong and deleted the core OS, that was fun getting it back :-)

Dave

Posted by David Clack on October 13, 2008 at 08:30 AM PDT #

I wrote a blog entry on configuring CUPS so one can print from Solaris to a MS Windows printer:
http://blogs.sun.com/DanX/entry/using_cups_print_server_for

Posted by Dan Anderson on October 20, 2008 at 08:42 AM PDT #

Hi,

Nice blog, I used to do the build cups into my systems before cups was integrated into OpenSolaris.

I still build gnome-cups-manager, building libgnomecups is a bit of a pain, but I just like the interface.

Dave

Posted by David Clack on October 20, 2008 at 09:18 AM PDT #

Yes, I have /export/home back'd up to external USB.

My job is to work out how to install on any systems our Solaris X86 OEM's can throw at me.

I also have to know how to fix them when they have broken them, just like I did last night with my B95 Acer C90S.

I just got one letter wrong and deleted the core OS, that was fun getting it back :-)

http://www.gifico.com
http://www.lv-cheap.com

Posted by louis vuitton on November 18, 2009 at 02:38 PM PST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

I work for the Java Embedded Global Business Unit of Oracle within Java Industry Solutions group under Alliances and Channels . I'm focused on the Java SE Embedded and BDB for ARM and PPC across multiple verticals

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today