[Samba] Public printing and private sharing?

k wayne pleexed at gmail.com
Tue Nov 20 21:14:33 GMT 2007

this is my first post on this list, i hope i do everything right :)

so, this is my situation:
there's a small network (about ~30 PCs), most of which are running XP
pro, some Vista (if the latter would complicate things a lot, we could
forget about them)
there's a server running ubuntu, to which a Brother HL5150D printer is
attached; printing using cups works fine, and if i set samba to
share-level security and make the printer available to the public,
everything works well, too.

however, i need to share some folders, with some sort of protection.
one possibility would be to password-protect each of these (if that
can be done using samba) or to use user-level security, which i would
prefer; however, this complicates printing quite a lot (which may be
because of a bad configuration, of course). i want to add the printer
once to every client PC and then print from office or other
applications without having to log into on the samba share - even if
it is just some guest account - , so everyone just has to hit the
"print" button, without prior authentication.

i have tried to set something up like that; here's my simple configuration file:

        workgroup = ast
        netbios name = smbserv
        server string = smbserv
        security = user
        encrypt passwords = yes
        printing = cups
        printcap name = cups
        passdb backend = tdbsam

        comment = Brother HL5150D
        path = /var/spool/samba
        browseable = no
        guest ok = yes
        read only = yes
        printable = yes
        use client driver = yes

however, i get an error when i try to print something, let's say from
winword, which says that something went wrong and i should try to
print a testpage. if i set security to share, printing works as
expected, but then i don't know a way to restrict access to other

unfortunately, i do not have two servers or IPs, so i cannot run two
instances of samba in the default port. is there a way to get what i

oh, and a second question, which will be of importance only as soon as
the first is solved :)
is there a way to make a samba share perform as if it had a "sticky
bit", so that users can upload files, but not alter, rename or delete

thank you in advance :)

More information about the samba mailing list