I'm currently having a problem with the new released Samba 2.2.5: I cannot print anymore on my shared printer. What is strange is that It worked fine with samba 2.2.4, but now I got an access denied whenever I try to access the printer... /var/spool/lpd/samba is chmod 777 and the username is in the group lp Here is part of my smb.conf: [global] workgroup = HOME netbios name = BOB server string = %h server (Samba %v) interfaces = 192.168.10.0/255.255.255.0 os level = 65 preferred master = True local master = yes domain master = auto wins support = yes dns proxy = No invalid users = root printing = lprng [printers] comment = All Printers path = /var/spool/lpd/samba printer admin = @lp read only = Yes create mask = 0755 guest ok = Yes printable = Yes print ok = yes print command = /usr/bin/lpr -P%p -r %s lpq command = /usr/bin/lpq -P%p lprm command = /usr/bin/lprm -P%p %j lppause command = /usr/sbin/lpc hold %p %j lpresume command = /usr/sbin/lpc release %p %j queuepause command = /usr/sbin/lpc -P%p stop queueresume command = /usr/sbin/lpc -P%p start browseable = No [epson660] comment = Epson Stylus color 660 path = /var/spool/lpd/samba printer admin = @lp read only = No create mask = 0755 guest ok = Yes printable = Yes print ok = yes use client driver = yes printer name = epson660 ------------------------------------------------------------- NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... Web/Wap : www.netcourrier.com T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)
It looks like you have a conflict between lprng rights and samba rights. LPRng is 0700 for the dir, and 0600 for the files within. Samba is 0777 for the dir and files. 1. create /var/spool/lpd/epson660 2. edit /etc/printcap or /usr/local/etc/printcap :sd= entry for the epson660 to reflect the change 3. delete the /var/spool/lpd/samba dir & files 4. run lpc reread 5. run checkpc -f -V to fix the dir/perm's 6. create /var/spool/samba/epson660 7. edit the smb.conf [epson660 ] path= to reflect the change 8. chown -R root.wheel (OpenBSD) or root.root (Linux?) /var/spool/samba 9. chmod -R 1777 /var/spool/samba 10. run testparm to see if samba is ok. 11. run lpc reread and restart samba 12. try a test page to see if it works again Let us know... Jim P.S. from the looks of it, you can move the (lprng) command stuff to [Global] and delete the [Printers] section entirely.> -----Original Message----- > From: r_ducomun@netcourrier.com [mailto:r_ducomun@netcourrier.com]> Sent: Wednesday, June 26, 2002 8:10 AM > To: samba@lists.samba.org > Subject: [Samba] Samba 2.2.5 and printers > > > I'm currently having a problem with the new released Samba > 2.2.5: I cannot print anymore on my shared printer. What is > strange is that It worked fine with samba 2.2.4, but now I > got an access denied whenever I try to access the printer... > > /var/spool/lpd/samba is chmod 777 and the username is in the group lp > > Here is part of my smb.conf:> [global] > workgroup = HOME > netbios name = BOB > server string = %h server (Samba %v) > interfaces = 192.168.10.0/255.255.255.0 > > os level = 65 > preferred master = True > local master = yes > domain master = auto > wins support = yes > dns proxy = No > invalid users = root > printing = lprng > [printers] > comment = All Printers > path = /var/spool/lpd/samba >printer admin = @lp> read only = Yes > create mask = 0755 > guest ok = Yes > printable = Yes > print ok = yes > print command = /usr/bin/lpr -P%p -r %s > lpq > command = /usr/bin/lpq -P%p > lprm command = /usr/bin/lprm -P%p %j > lppause command = /usr/sbin/lpc hold %p %j > lpresume command = /usr/sbin/lpc release %p %j > queuepause command = /usr/sbin/lpc -P%p stop > queueresume command = /usr/sbin/lpc -P%p start> browseable = No > [epson660] > comment = Epson Stylus color 660 > path = /var/spool/lpd/samba > printer admin = @lp > read only = No > create mask = 0755 > guest ok = Y > es > printable = Yes > print ok = yes > use client driver = yes > printer name = epson660 > > > ------------------------------------------------------------- > NetCourrier, votre bureau virtuel sur Internet : Mail,> Agenda, Clubs, Toolbar... > Web/Wap : www.netcourrier.com > T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) > Minitel: 3615 NETCOURRIER (0,15 ? TTC/min) > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailma > n/listinfo/samba >
You have guest ok = yes but haven't explicitly defined who the guest user will be. Thus, if someone logs on to the printer, and doesn't supply a user/password, what user is really trying to print? The access denied may be due to something besides the permissions on the spool directory? I use guest account = ftp Also, I used to get a somewhat similar error with XP, although printing would still work, and this error was fixed with: use client driver = yes Joel On Wed, Jun 26, 2002 at 05:10:17PM +0200, r_ducomun@netcourrier.com wrote:> I'm currently having a problem with the new released Samba 2.2.5: I cannot print anymore on my shared printer. What is strange is that It worked fine with samba 2.2.4, but now I got an access denied whenever I try to access the printer... > > /var/spool/lpd/samba is chmod 777 and the username is in the group lp > > Here is part of my smb.conf: > [global] > workgroup = HOME > netbios name = BOB > server string = %h server (Samba %v) > interfaces = 192.168.10.0/255.255.255.0 > os level = 65 > preferred master = True > local master = yes > domain master = auto > wins support = yes > dns proxy = No > invalid users = root > printing = lprng > [printers] > comment = All Printers > path = /var/spool/lpd/samba > printer admin = @lp > read only = Yes > create mask = 0755 > guest ok = Yes > printable = Yes > print ok = yes > print command = /usr/bin/lpr -P%p -r %s > lpq command = /usr/bin/lpq -P%p > lprm command = /usr/bin/lprm -P%p %j > lppause command = /usr/sbin/lpc hold %p %j > lpresume command = /usr/sbin/lpc release %p %j > queuepause command = /usr/sbin/lpc -P%p stop > queueresume command = /usr/sbin/lpc -P%p start > browseable = No > [epson660] > comment = Epson Stylus color 660 > path = /var/spool/lpd/samba > printer admin = @lp > read only = No > create mask = 0755 > guest ok = Yes > printable = Yes > print ok = yes > use client driver = yes > printer name = epson660 > > > ------------------------------------------------------------- > NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... > Web/Wap : www.netcourrier.com > T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) > Minitel: 3615 NETCOURRIER (0,15 ? TTC/min) > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
This may be of interest. It comes from man smb.conf guest account (S) This is a username which will be used for access to services which are specified as guest ok (see below). Whatever privileges this user has will be available to any client connecting to the guest service. Typically this user will exist in the pass- word file, but will not have a valid login. The user account "ftp" is often a good choice for this parameter. If a username is specified in a given service, the speci- fied username overrides this one. One some systems the default guest account "nobody" may not be able to print. Use another account in this case. You should test this by trying to log in as your guest user (perhaps by using the su - command) and trying to print using the system print command such as lpr(1) or lp(1). Default: specified at compile time, usually "nobody" Example: guest account = ftp Joel On Wed, Jun 26, 2002 at 05:10:17PM +0200, r_ducomun@netcourrier.com wrote:> I'm currently having a problem with the new released Samba 2.2.5: I cannot print anymore on my shared printer. What is strange is that It worked fine with samba 2.2.4, but now I got an access denied whenever I try to access the printer... > > /var/spool/lpd/samba is chmod 777 and the username is in the group lp > > Here is part of my smb.conf: > [global] > workgroup = HOME > netbios name = BOB > server string = %h server (Samba %v) > interfaces = 192.168.10.0/255.255.255.0 > os level = 65 > preferred master = True > local master = yes > domain master = auto > wins support = yes > dns proxy = No > invalid users = root > printing = lprng > [printers] > comment = All Printers > path = /var/spool/lpd/samba > printer admin = @lp > read only = Yes > create mask = 0755 > guest ok = Yes > printable = Yes > print ok = yes > print command = /usr/bin/lpr -P%p -r %s > lpq command = /usr/bin/lpq -P%p > lprm command = /usr/bin/lprm -P%p %j > lppause command = /usr/sbin/lpc hold %p %j > lpresume command = /usr/sbin/lpc release %p %j > queuepause command = /usr/sbin/lpc -P%p stop > queueresume command = /usr/sbin/lpc -P%p start > browseable = No > [epson660] > comment = Epson Stylus color 660 > path = /var/spool/lpd/samba > printer admin = @lp > read only = No > create mask = 0755 > guest ok = Yes > printable = Yes > print ok = yes > use client driver = yes > printer name = epson660 > > > ------------------------------------------------------------- > NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... > Web/Wap : www.netcourrier.com > T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) > Minitel: 3615 NETCOURRIER (0,15 ? TTC/min) > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
Thanks for your tips, anyway it didn't solve my problem. I always get an acces denied from windows when I want to connect to my shared printer. I also tried adding a guest account, but it didn't change anything. Here is an output the log level 3: [2002/06/26 21:08:24, 3] rpc_server/srv_pipe.c:api_rpcTNP(1180) api_rpcTNP: pipe 29165 rpc command: SPOOLSS_OPENPRINTEREX checking name: \\Bob\epson660 [2002/06/26 21:08:24, 3] rpc_server/srv_spoolss_nt.c:set_printer_hnd_printertype (379) Setting printer type=\\Bob\epson660 [2002/06/26 21:08:24, 3] rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex(11 07) access DENIED for printer open [2002/06/26 21:08:24, 3] rpc_server/srv_lsa_hnd.c:close_policy_hnd(205) Closed policy ----Message r?exp?di?---->Date: Wed, 26 Jun 2002 12:36:47 -0400 >De: "Van Sickler, Jim" <vansickj-eodc@Kaman.com> >Sujet: RE: [Samba] Samba 2.2.5 and printers >A: "'r_ducomun@netcourrier.com'" <r_ducomun@netcourrier.com>, > >It looks like you have a conflict >between lprng rights and samba rights. > >LPRng is 0700 for the dir, and 0600 for >the files within. Samba is 0777 for >the dir and files. > >1. create /var/spool/lpd/epson660 > >2. edit /etc/printcap or /usr/local/etc/printcap >:sd= entry for the epson660 to reflect the change > >3. delete the /var/spool/lpd/samba dir & files > >4. run lpc reread > >5. run checkpc -f -V to fix the dir/perm's > >6. create /var/spool/samba/epson660 > >7. edit the smb.conf [epson660 >] path= to reflect >the change > >8. chown -R root.wheel (OpenBSD) or root.root (Linux?) >/var/spool/samba > >9. chmod -R 1777 /var/spool/samba > >10. run testparm to see if samba is ok. > >11. run lpc reread and restart samba > >12. try a test page to see if it works again > >Let us know... > >Jim > >P.S. from the looks of it, you can move >the (lprng) command stuff to [Global] and >delete the [Printers] section entirely. > > >> -----Original Message----- >> From: r_ducomun@netcourrier.com [mailto:r_ >ducomun@netcourrier.com] >> Sent: Wednesday, June 26, 2002 8:10 AM >> To: samba@lists.samba.org >> Subject: [Samba] Samba 2.2.5 and printers >> >> >> I'm currently having a problem with the new released Samba >> 2.2.5: I cannot print anymore on my shared printer. What is >> strange is that It worked fine with samba 2.2.4, but now I >> got an access denied whenever I try to access the printer... >> >> /var/spool/lpd/samba is chmod 777 and the username is in the group lp >> >> Here is part of my smb.co >nf: >> [global] >> workgroup = HOME >> netbios name = BOB >> server string = %h server (Samba %v) >> interfaces = 192.168.10.0/255.255.255.0 >> >> os level = 65 >> preferred master = True >> local master = yes >> domain master = auto >> wins support = yes >> dns proxy = No >> invalid users = root >> printing = lprng >> [printers] >> comment = All Printers >> path = /var/spool/lpd/samba >> > printer admin = @lp >> read only = Yes >> create mask = 0755 >> guest ok = Yes >> printable = Yes >> print ok = yes >> print command = /usr/bin/lpr -P%p -r %s >> lpq >> command = /usr/bin/lpq -P%p >> lprm command = /usr/bin/lprm -P%p %j >> lppause command = /usr/sbin/lpc hold %p %j >> lpresume command = /usr/sbin/lpc release %p %j >> queuepause command = /usr/sbin/lpc -P%p stop >> queueresume command = /usr/ >sbin/lpc -P%p start >> browseable = No >> [epson660] >> comment = Epson Stylus color 660 >> path = /var/spool/lpd/samba >> printer admin = @lp >> read only = No >> create mask = 0755 >> guest ok = Yes >> printable = Yes >> print ok = yes >> use client driver = yes >> printer name = epson660 >> >>------------------------------------------------------------- NetCourrier, votre bureau virtuel sur Internet : Mail, Agenda, Clubs, Toolbar... Web/Wap : www.netcourrier.com T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) Minitel: 3615 NETCOURRIER (0,15 ? TTC/min)
I saw a msg that reminded me of something: it may be the initial IPC$ connection that is being denied. That's for the Guest user, I think. Guest is the Win2k equivalent of Everybody. I created a user called smb_nobody, no login allowed (can't use the account to hack in via a shell) you can skip this and use the user ftp, as others do. in smbusers, mapped nobody=smb_nobody or nobody=ftp, if you use the user ftp in smb.conf: map to guest=Bad User guest account=smb_nobody (Bad User is an u nknown connection, like IPC$, I guess) in [EPSON660], put guest ok=yes ------------------------------------------------------------------- Look at printer_driver2.html for more explicit info. Here's a pertinent excerpt about map to guest=Bad User: Note that this parameter is needed to set up "Guest" share services when using security modes other than share. This is because in these modes the name of the resource being requested is not sent to the server until after the server has successful ly authenticated the client so the server cannot make authentication decisions at the correct time (connection to the share) for "Guest" shares Hope this helps, Jim> -----Original Message----- > From: r_ducomun@netcourrier.com [mailto:r_ducomun@netcourrier.com] > Sent: Thursday, June 27, 2002 12:01 PM > To: vansickj-eodc@Kaman.com > Cc: samba@lists.samba.org > Subject: RE: [Samba] Samba 2.2.5 and printers > > > Thanks for your tips, anyway it didn't solve my problem. I > always get an acces denied from windows when I want to> connect to my shared printer. I also tried adding a guest > account, but it didn't change anything. Here is an output the > log level 3: > > [2002/06/26 21:08:24, 3] rpc_server/srv_pipe.c:api_rpcTNP(1180) > api_rpcTNP: pipe 29165 rpc command: SPOOLSS_OPENPRINTEREX > checking name: \\Bob\epson660 > [2002/06/26 21:08:24, 3] > rpc_server/srv_spoolss_nt.c:set_printer_hnd_printertype > (379) > Setting prin > ter type=\\Bob\epson660 > [2002/06/26 21:08:24, 3]> rpc_server/srv_spoolss_nt.c:_spoolss_open_printer_ex(11 > 07) > access DENIED for printer open > [2002/06/26 21:08:24, 3] > rpc_server/srv_lsa_hnd.c:close_policy_hnd(205) > Closed policy > > > > ----Message r?exp?di?---- > >Date: Wed, 26 Jun 2002 12:36:47 -0400 > >De: "Van Sickler, Jim" <vansickj-eodc@Kaman.com> > >Sujet: RE: [Samba] Samba 2.2.5 and printers > >A: "'r_ducomun@netcourrier.com'" <r_ducomun@netcourrier.com>, > > > >It looks like you have a conflict > >be > tween lprng rights and samba rights. > > > >LPRng is 0700 for the dir, and 0600 for > >the files within. Samba is 0777 for > >the dir and files. > > > >1. create /var/spool/lpd/epson660 > > > >2. edit /etc/printcap or /usr/local/etc/printcap > >:sd= entry for the epson660 to reflect the change > > > >3. delete the /var/spool/lpd/samba dir & files > > > >4. run lpc reread > > > >5. run checkpc -f -V to fix the dir/perm's > > > >6. create /var/spool/samba/epson660 > > > >7.edit the smb.conf [epson660> >] path= to refl > ect > >the change > > > >8. chown -R root.wheel (OpenBSD) or root.root (Linux?) > >/var/spool/samba > > > >9. chmod -R 1777 /var/spool/samba > > > >10. run testparm to see if samba is ok. > > > >11. run lpc reread and restart samba > > > >12. try a test page to see if it works again > > > >Let us know... > > > >Jim > > > >P.S. from the looks of it, you can move > >the (lprng) command stuff to [Global] and > >delete the [Printers] section entirely.> > > > > >> -----Original Message----- > >> From: r_ducomun@netcourrier.com [ > mailto:r_ > >ducomun@netcourrier.com] > >> Sent: Wednesday, June 26, 2002 8:10 AM > >> To: samba@lists.samba.org > >> Subject: [Samba] Samba 2.2.5 and printers > >> > >> > >> I'm currently having a problem with the new released Samba > >> 2.2.5: I cannot print anymore on my shared printer. What is > >> strange is that It worked fine with samba 2.2.4, but now I > >> got an access denied whenever I try to access the printer...> >> > >> /var/spool/lpd/samba is chmod 777 and the username is in > the group lp > >> > >> > Here is part of my smb.co > >nf: > >> [global] > >> workgroup = HOME > >> netbios name = BOB > >> server string = %h server (Samba %v) > >> interfaces = 192.168.10.0/255.255.255.0 > >> > >> os level = 65 > >> preferred master = True > >> local master = yes > >> domain master = auto > >>wins support = yes> >> dns proxy = No > >> invalid users = root > >> printing = lprng > >> [printers] > >> comment = All Printers > >> > path = /var/spool/lpd/samba > >> > > printer admin = @lp > >> read only = Yes > >> create mask = 0755 > >> guest ok = Yes > >> printable = Yes > >> print ok = yes > >> print command = /usr/bin/lpr -P%p -r %s > >> lpq > >> command = /usr/bin/lpq -P%p> >> lprm command = /usr/bin/lprm -P%p %j > >> lppause command = /usr/sbin/lpc hold %p %j > >> lpresume command = /usr/sbin/lpc release %p %j > >> queuepause command = /u > sr/sbin/lpc -P%p stop > >> queueresume command = /usr/ > >sbin/lpc -P%p start > >> browseable = No > >> [epson660] > >> comment = Epson Stylus color 660 > >> path = /var/spool/lpd/samba > >> printer admin = @lp > >> read only = No > >>create mask = 0755> >> guest ok = Yes > >> printable = Yes > >> print ok = yes > >> use client driver = yes > >> printer name = epson660 > >> > >> > > ------------------------------------------ > ------------------- > NetCourrier, votre bureau virtuel sur Internet : Mail, > Agenda, Clubs, Toolbar... > Web/Wap : www.netcourrier.com > T?l?phone/Fax : 08 92 69 00 21 (0,34 ? TTC/min) > Minitel: 3615 NETCOURRIER (0,15 ? TTC/min) > > ?AETiT >7AE
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, Everyone -- I apologize for the double post, but this morning I remembered that I sent this message originally with the wrong subject. That's what happens when you change your mind on what to say half way into the message. :) How can I create a custom printer form for use on the printers shared by Samba? I tried to add a printer form via the "Server Properties" gizmo from a Win2k Pro client, but I get "Form formname could not be added. Operation could not be completed." When I do an enumforms <printername> via rpcclient to the Samba server, I get an NT_STATUS_UNSUCCESSFUL. If I do this against our WinNT 4.0 server with printers, it gives me the list. Is there some funky hack I can use? This is becoming critical because I NEED to move the printers on this server to something else (preferably a Samba server) quickly, but I can't do it if I cannot assign a custom printer form to a tray (i.e. "letterhead" to the tray which has the letterhead in it). I have found solutions to all of my other printing issues with Samba. I'm using Samba 2.2.5 with all of the current 4 post-2.2.5 patches, cups 1.1.14-15, on Red Hat 7.3 with kernel 2.4.18-5. Second, when creating a new folder on a Samba share from a Windows 2000 client, I get the following message within Windows: You may not be able to access files created in the folder H:\New Folder. Do you want to continue? This message is harmless; if I go ahead and create the folder, it is created and can be accessed without issues. This does not happen on any of the other shares, just the homes share (referenced via the user's name, i.e. net use h: \\server\username). I have disabled oplocks, as per my smb.conf file below. [global] workgroup = THE-ROCK netbios name = ADAM security = DOMAIN encrypt passwords = Yes password server = ANDREW SAINTPETER username map = /usr/local/samba/private/usermap log file = /usr/local/samba/var/%m.log large readwrite = Yes name resolve order = lmhosts wins bcast host time server = Yes deadtime = 1 socket options = TCP_NODELAY SO_KEEPALIVE printcap name = cups enumports command = /usr/local/samba/bin/enumprinters os level = 60 wins support = Yes remote announce = 192.168.0.255/THE-ROCK 192.168.1.255/THE-ROCK host msdfs = Yes printer admin = root @root @PrinterAdmins shearerp dougv printing = cups [groups] comment = Department Group Folders path = /home/groups admin users = @GDriveAdmins read only = No create mask = 0666 directory mask = 0777 hide unreadable = Yes oplocks = No level2 oplocks = No [public] path = /home/Public admin users = @root write list = @Staff @root read only = No create mask = 0664 directory mask = 0775 hide unreadable = Yes oplocks = No level2 oplocks = No [print$] path = /usr/local/samba/printers admin users = @root @PrinterAdmins write list = @root @PrinterAdmins read only = No guest ok = Yes [homes] read only = No create mask = 0600 directory mask = 0700 hide unreadable = Yes veto files /.gnome*/.bash*/.ssh/.netscape/.saw*/.X*/.emacs/.gtkrc*/.kxm*/.scre*/. wl/.ncftp/.mc*/ browseable = No oplocks = No level2 oplocks = No [profiles] comment = User Profiles Directory path = /home/profiles admin users = @root read only = No create mask = 0600 directory mask = 0700 nt acl support = No Thank you ahead of time for all of your help! ____________________________________ Peter D. Shearer Network Administrator Northwest Christian College, Eugene, OR shearerp@nwcc.edu http://www.nwcc.edu -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com> iQA/AwUBPVKL0nKsm45T6MEnEQIsPQCfev7N8iEO3eteYsmeKEvObYdFIPEAoJ3O hP+c4Oao0TQPWJEh/3JD+wjA =0GVx -----END PGP SIGNATURE-----