Shared Printer Problems. Mint-to-XP [SOLVED]

Forum rules
Before you post please read this

Shared Printer Problems. Mint-to-XP [SOLVED]

Postby racepics on Sun Aug 26, 2012 11:01 pm

Hi all , I'm using Mint 13 MATE 64bit and I have a Canon iP4500 connected by usb and shared. I'm connected via wireless to our Modem/router.
The wife's PC is WinXP64 and connected via eth cable. While the XP PC can see my shared printer, it cannot connect to it. "Windows cannot connect to the printer. The specified printer has lost its connection to the sever.. etc"
Samba file sharing is working fine though, I have shared directories that she has mounted as network-drives and that all works perfectly.
The XP machine does have the correct drivers (they are listed in the search) as the printer has been connected directly to that PC before.

So the printer is enabled and shared and published. XP can see it, but cannot connect to it. Almost seems to be some sort of permissions issue?

Any help greatly appreciated.

Chris
Last edited by racepics on Mon Aug 27, 2012 4:38 pm, edited 1 time in total.
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Linux Mint is funded by ads and donations.
 

Re: Shared Printer Problems. Mint-to-XP

Postby heavy metal on Sun Aug 26, 2012 11:08 pm

Linux Mint Debian Edition MATE DE 64-bit
Gigabyte G41M-ES2L--->2gb ram
Intel Pentium Dual Core 2.60ghz-->E5300
WD-6400AAKS-Caviar-SE16-640gb
Proud user of LMDE
User avatar
heavy metal
Level 2
Level 2
 
Posts: 90
Joined: Mon Jan 25, 2010 11:00 pm
Location: Puerto Rico

Re: Shared Printer Problems. Mint-to-XP

Postby racepics on Sun Aug 26, 2012 11:46 pm

This all worked perfectly when I was using Ubuntu so seeing as Mint is derived from that, I would have thought it would still just work.
(installing virtualbox and another os is a really ugly workaround and kinda defeats the purpose of using linux in the first place)
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Re: Shared Printer Problems. Mint-to-XP

Postby altair4 on Mon Aug 27, 2012 6:55 am

First, make sure the printer on Mint is shared and the CUPS server is running and set to publish that shared printer and that Samba is allowing access to the printer. You stated in your post that you did all this but I'm just trying to rule out the basics:

Run the following command:
Code: Select all
system-config-printer

** Publish Shared Printers

Server > Settings > Select the following:

Publish Shared Printers connected to this system
Allow printing from the Internet

** Enable Sharing of the Attached Printer

Right Click the attached printer > Properties > Policies
Check Enabled, Accepting Jobs, and Shared

** To allow guest access through Samba:

Edit smb.conf as root:
Code: Select all
gksu gedit /etc/samba/smb.conf

Look for the [printers] share and change the "guest ok" line from no to yes and add another line:
[printers]
comment = All Printers
browseable = No
path = /var/spool/samba
printable = yes
guest ok = yes
printer admin = @lpadmin
read only = yes
create mask = 0700

Save smb.conf and restart samba:
Code: Select all
sudo service smbd restart

Second, just to make sure the firewall isn't getting in the way disable it on Mint and see if that it is the issue:
Code: Select all
sudo ufw disable

Third, there is a bug in the latest Ubuntu that follows through to Mint that may or may not affect you. To see if it does open a terminal and run the following command:
Code: Select all
sudo rpcclient localhost

The prompt changes to "rpcclient $>. At that point enter the following command
Code: Select all
enumprinters

You may get an output that looks something like this:
flags:[0x800000]
name:[\\LOCALHOST\]
description:[\\LOCALHOST\,,HP970-Photo]
comment:[HP970-Photo]

Note that the description and the comment contain the correct printer name but the "name" field only contains LOCALHOST. . It's the "name" that Windows needs to connect to and it's empty. To exit the terminal type:
Code: Select all
exit

If the "name" field has the correct printer name then the problem is something else. If it's empty as it is above then see here for how to correct it: viewtopic.php?f=42&t=28397&p=618065#p618065
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6125
Joined: Tue Feb 03, 2009 10:27 am

Re: Shared Printer Problems. Mint-to-XP

Postby racepics on Mon Aug 27, 2012 3:03 pm

Thanks for your response. I found that my smb.conf didn't have the printer 'admin = @lpadmin' line so inserted that.
Code: Select all
enumprinters

Gives me this.
flags:[0x800000]
name:[\\LOCALHOST\]
description:[\\LOCALHOST\,,iP4500]
comment:[iP4500]
So I tried to set the printer name
Code: Select all
setprintername iP4500 iP4500

I get this
rpcclient $> setprintername iP4500 iP4500
result was WERR_ACCESS_DENIED
rpcclient $>
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Re: Shared Printer Problems. Mint-to-XP

Postby altair4 on Mon Aug 27, 2012 3:48 pm

That's my fault, sorry. I have in my global section a "force user" which is not the default and I forgot that it was there.

Add one more line to the [printers] section please:
[printers]
comment = All Printers
browseable = No
path = /var/spool/samba
printable = yes
guest ok = yes
printer admin = @lpadmin
force user = altiar
read only = yes
create mask = 0700

Change altair to your own login user name

Restart samba again: sudo service smbd restart

Then do the sudo rpcclient localhost process again.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6125
Joined: Tue Feb 03, 2009 10:27 am

Re: Shared Printer Problems. Mint-to-XP

Postby racepics on Mon Aug 27, 2012 3:56 pm

Thanks - added that line (with my username) but the setprintername process still gives this


rpcclient $> enumprinters
flags:[0x800000]
name:[\\LOCALHOST\]
description:[\\LOCALHOST\,,iP4500]
comment:[iP4500]

rpcclient $> setprintername iP4500 iP4500
result was WERR_ACCESS_DENIED
rpcclient $>
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Re: Shared Printer Problems. Mint-to-XP

Postby altair4 on Mon Aug 27, 2012 3:59 pm

Please post the output of the following command:
Code: Select all
testparm -s

EDIT: Do it this way to bypass everything:

Remove "force user = altair" from the [printers] section and add it to the [global] section - right under the workgroup line:
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
force user = altair

Then restart samba and try it again.
Last edited by altair4 on Mon Aug 27, 2012 4:13 pm, edited 2 times in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6125
Joined: Tue Feb 03, 2009 10:27 am

Re: Shared Printer Problems. Mint-to-XP

Postby racepics on Mon Aug 27, 2012 4:10 pm

testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[printers]"
WARNING: The "printer admin" option is deprecated
Processing section "[print$]"
Processing section "[disk-1]"
Processing section "[disk-2]"
Loaded services file OK.
Server role: ROLE_STANDALONE
[global]
server string = %h server (Samba, Ubuntu)
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d
idmap config * : backend = tdb

[printers]
comment = All Printers
path = /var/spool/samba
printer admin = @lpadmin
force user = chris
create mask = 0700
guest ok = Yes
printable = Yes
print ok = Yes
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
read only = No
guest ok = Yes

[disk-1]
path = /media/disk-1
read only = No
guest ok = Yes

[disk-2]
path = /media/disk-2
read only = No
guest ok = Yes
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Re: Shared Printer Problems. Mint-to-XP

Postby altair4 on Mon Aug 27, 2012 4:13 pm

Posted past each other - I don't know if you saw my edit:

EDIT: Do it this way to bypass everything:

Remove "force user = altair" from the [printers] section and add it to the [global] section - right under the workgroup line:
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = WORKGROUP
force user = altair

Then restart samba and try it again.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6125
Joined: Tue Feb 03, 2009 10:27 am

Re: Shared Printer Problems. Mint-to-XP [SOLVED]

Postby racepics on Mon Aug 27, 2012 4:23 pm

You Sir, are a Genius! Thankyou :)

rpcclient $> setprintername iP4500 iP4500
Success in setting printername.
rpcclient $>

rpcclient $> enumprinters
flags:[0x800000]
name:[\\LOCALHOST\iP4500]
description:[\\LOCALHOST\iP4500,Canon iP4500 series,iP4500]
comment:[iP4500]

rpcclient $>
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Re: Shared Printer Problems. Mint-to-XP

Postby altair4 on Mon Aug 27, 2012 4:30 pm

Whew ! Sorry for the long path to this.

So the WinXP machine can find and print to the Mint printer?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6125
Joined: Tue Feb 03, 2009 10:27 am

Re: Shared Printer Problems. Mint-to-XP

Postby racepics on Mon Aug 27, 2012 4:31 pm

Yes - tested and working :)
Thanks!
racepics
Level 1
Level 1
 
Posts: 8
Joined: Sun Aug 26, 2012 10:46 pm

Re: Shared Printer Problems. Mint-to-XP [SOLVED]

Postby rickyrockrat on Mon Jan 14, 2013 2:10 pm

force user =
Is not necessary. Use this and it will find the user:
rpcclient -U "WORKGROUP\user" -H server
here's a link to the bug in Samba - see for even more info:

https://bugs.launchpad.net/ubuntu/+sour ... bug/967410
rickyrockrat
Level 1
Level 1
 
Posts: 1
Joined: Mon Jan 14, 2013 1:49 pm

Linux Mint is funded by ads and donations.
 

Return to Printers & Scanners

Who is online

Users browsing this forum: No registered users and 2 guests