Forum Home
Press F1
 
Thread ID: 36200 2003-08-02 14:27:00 Sharing Windows printer with Red Hat 9 Jen C (20) Press F1
Post ID Timestamp Content User
164805 2003-08-02 14:27:00 Hi all

I am stuck. :) I have run out of my limited ideas at this point, and have now entered the "I am just getting more confused stage". So this is where I am at currently...

I am trying to access a shared printer located on a WinXP machine from a Red Hat 9 machine. Both the PC's are networked and I can access shared files on each with no problems using samba-2.2.7a-8.9.0. The printer is an Epson Stylus Color 480 which has sharing enabled on the XP PC. This is what the smb.conf has for printers (default):[printers] comment = All
Printers path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes

I used printtool to set up the printer configuration and selected queue type as Networked Windows (SMB). In the Authentication section, the workgroup, server = origin (Red Hat machine), share (printer) were all automatically detected. I just added my username and password (same for XP and RH9). At the end of the configuration I saved the changes and restarted the service.
[root@origin root]# service lpd restart
Stopping lpd: [FAILED]
Starting lpd: 2003-08-02-23:39:34.446 origin Get_local_host: 'localhost' IP
address not available!
[ OK ]
[root@origin root]#
As you can see there is a problem with the lpd service. I see the same starting error message when lpd starts during bootup. During shutdown, lpd shows a failed response to the SIGTERM signal and is killed each time with SIGKILL.

Under Services, lpd gives this under status: lpd dead but subsys locked. Interesting enough anacron also has this under status: anacron dead but subsys locked??

I have deleted the printer and added it several times now all with the same result.

The 'localhost' IP address which is missing seems to be part of the problem. I have looked in various files but have succeeded in confusing myself further where I need to add the missing IP address. The lpd service is also a problem and I am not sure how to fix that either.

Any advice would be appreciated.

Cheers
Jen
Jen C (20)
164806 2003-08-03 00:55:00 Hi Jen,

Ok, I don't run a shared printer (actually I would probably do it the other way around if I was - the printer plugged into the linux box); anyway what does your /etc/hosts file look like... the localhost entry look ok. Can't you configure a printer in KDE to point to \\WinXPHost\SharedPrinterName.
Dolby Digital (160)
164807 2003-08-03 01:24:00 Hi Dolby Digital

This is what my /etc/host looks like:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 origin.localdomain redhat
192.168.1.3 myth 2400
192.168.1.3 is the XP machine with the attached printer.

I just used printtool and basically followed my nose with the settings, so I thought the samba printer entry would sort out the sharing part with XP. Bit of a newbie with networking so it is possible my interpretations of the settings may be off.

When selecting edit for the printer queue, it shows these settings under queue type:

Queue type: Networked Windows (SMB)
Server hostname or IP address: 192.168.1.4 <--- this is origin/red hat
Share: //ORIGIN/printer
workgroup: MSHOME

I have tried to change the IP address to the XP machine and share path, but was not sure what exactly to put in for share. The fact I cannot restart the lp daemon (plus the current status of it) is also throwing a spanner in the works, as I might have the settings right but they cannot be incorporated into lpd.

If I cannot get this printer sharing working, it is not a big problem as I can easily access the document via the network from XP and print it from there. It would just be tidier to have a direct print option available with RH and I thought this would be a good learning exercise for me.

Cheers
Jen
Jen C (20)
164808 2003-08-03 03:18:00 Your /etc/hosts file needs a <space> or <tab> between 127 . 0 . 0 . 1 and the following . I would add a "localhost" to that line , as an alias to the name you have there . But it looks as if you might have it expecting to find the shared printer on the Linux host . ;-)

The "locked" error message is one which catches me from time to time . Shared services with only one device use "lock files" to ensure that only one user at a time can use ity . When one user's task has finished, it removes the lock so others can have a go . If you have got something wrong in a setup, the lock file might be made, but not removed . So . . .

I think redundant (leftover) locks are removed at boot time, but have a look at /var/locks . The name will be obvious, justv remove it . It won't do any harm . (If you are the only user, you are likely to be using any service only once at a time, so even removing a valid lock doesn't matter) . :D

It's like all these things, once you get it right, it works . But getting it right . :_|
Graham L (2)
164809 2003-08-03 04:20:00 I DID IT! I DID IT! <said whilst bouncing up and down on chair!> :D

You pointed me the right direction Graham. I changed the RH's alias from redhat back to localhost. Went and deleted the lpd lock in /var/locks (had actually tried this before without success), then went back and edited the printer queue so that it pointed to XP only and added its IP address. Stopped and restarted the lpd service (no error messages this time) and now it works! :D

Thanks everyone for your help :)

Happy Jen
Jen C (20)
1