WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Newbie here - Cups problem  (Read 8170 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: Newbie here - Cups problem
« Reply #15 on: July 12, 2009, 11:17:39 PM »
There seems to be something about the cups browser interface and root password that doesn't work quite right.

If you use the cups menu item/icon to start dbus, start cups and enter the root password, things seem to go OK. If you want to do something after an error of some sort then the browser interface no longer accepts the root password. I've managed to get out of this by killing the cups daemon(s) and re-starting, but there must be a better way.

I'm just waiting for cups-4 to be released and then I'll recompile on tc_2.x

Quote
This opens up a dialog box for username, password for cups, localhost 631...which means somethings not configured right (it won't accept anything).

Do you need the username for the windows printer to exist in tinycore/samba by any chance?
« Last Edit: July 12, 2009, 11:23:25 PM by Juanito »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Newbie here - Cups problem
« Reply #16 on: July 13, 2009, 01:35:02 AM »
T
If you use the cups menu item/icon to start dbus, start cups and enter the root password, things seem to go OK. If you want to do something after an error of some sort then the browser interface no longer accepts the root password. I've managed to get out of this by killing the cups daemon(s) and re-starting, but there must be a better way.


Do you need the username for the windows printer to exist in tinycore/samba by any chance?

No, it's not accepting anything I can come up with. Starting, stopping cups doesn't help, nor
entering root passwd. 
Code: [Select]
A username and password are being requested by http://localhost:631.
The site says: "CUPS"

I screwed around with smb.conf and cupsd.conf, but no luck. I couldn't get "lppasswd" to work, in usr or root:
Code: [Select]
lppasswd: Unable to open password file: Permission denied
lppasswd: user "root" and group "staff" do not exist.

Running testparm correctly lists the win server.  
testparm:
ERROR: lock directory /var/lib/samba does not exist
[global]
        workgroup = MYGROUP
        server string = Samba Server
        log file = /usr/local/samba/var/log.%m
        max log size = 50
        dns proxy = No
        wins server = 192.168.1.104
        wins support = Yes


« Last Edit: July 13, 2009, 01:36:48 AM by jpeters »

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Newbie here - Cups problem
« Reply #17 on: July 13, 2009, 04:41:27 AM »
solved it.  What it needed was: (cupsd.conf)

Code: [Select]
# Restrict access to the server...
<Location />
  Order allow all
  Allow localhost
</Location>

Then entering user: "root"  and the root password worked. 

« Last Edit: July 13, 2009, 04:44:18 AM by jpeters »

Offline 3rail

  • Full Member
  • ***
  • Posts: 114
Re: Newbie here - Cups problem
« Reply #18 on: July 13, 2009, 09:16:46 AM »
What does the hplip menu icon run so I can throw it into bootlocal upon startup?

TIA

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: Newbie here - Cups problem
« Reply #19 on: July 13, 2009, 10:37:40 AM »
If you look in:

/usr/local/tce.icons/hplip
or
/usr/local/tce.menu/hplip

you'll find "/usr/local/bin/hplip_start.sh"

Code: [Select]
$ cat /usr/local/bin/hplip_start.sh
#!/bin/sh
#
# Check if root password is set
# and prompt to set if not
#
if sudo grep "root:[$]1[$]EbR327ag[$]" /etc/shadow 2>&1 >/dev/null; then
     aterm -title "Set Root Password" -e sudo passwd
fi
#
# Check if cups is started
# and start/restart
#
if ! ps | grep cupsd; then
  sudo /etc/init.d/cups start
  else
  sudo /etc/init.d/cups restart
fi
#
# start dbus
#
if [ ! -e /var/lib/dbus ]; then
  sudo mkdir -p /var/lib/dbus
fi
#
if [ ! -e /var/lib/dbus/machine-id ]; then
  sudo dbus-uuidgen --ensure
fi
#
if [ ! -e /var/run/dbus ]; then
  sudo mkdir -p /var/run/dbus
fi
#
if [ ! -e /etc/dbus-1/system.d ]; then
  sudo mkdir -p /etc/dbus-1/system.d
fi
#
if [ ! -e /var/run/dbus/pid ]; then
  sudo /usr/local/bin/dbus-daemon --system
fi
#
if [ ! -e /etc/dbus-1/session.d ]; then
  sudo mkdir -p /etc/dbus-1/session.d
fi
#
#EOF

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Newbie here - Cups problem
« Reply #20 on: July 13, 2009, 11:11:47 AM »
What does the hplip menu icon run so I can throw it into bootlocal upon startup?

TIA

I ran without hplip.  When I tried to print, I had smb.conf issues. After rebooting (despite recopy of cupsd.conf,  the password issue reemerged. 

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: Newbie here - Cups problem
« Reply #21 on: July 13, 2009, 05:21:21 PM »
Got it working.  For cupsd, I added  Allow @LOCAL after Order allow,deny for categories, and after
#'Allow remote access'  added "Port 631"  (I copied from Puppy )    

note: Juanito....thanks for all the extensions, inc the hplib libs. This works.  
note: I  think in the samba3.tc*.info file,  'samba.conf' should be 'smb.conf'    

/etc/cups/cupsd.conf

edit: DocumentRoot path

Code: [Select]
#
# "$Id: cupsd.conf.in,v 1.17 2005/01/03 19:29:45 mike Exp $"
#
#   Sample configuration file for the Common UNIX Printing System (CUPS)
#   scheduler.
#
#   Copyright 1997-2005 by Easy Software Products, all rights reserved.
#
#   These coded instructions, statements, and computer programs are the
#   property of Easy Software Products and are protected by Federal
#   copyright law.  Distribution and use rights are outlined in the file
#   "LICENSE.txt" which should have been included with this file.  If this
#   file is missing or damaged please contact Easy Software Products
#   at:
#
#       Attn: CUPS Licensing Information
#       Easy Software Products
#       44141 Airport View Drive, Suite 204
#       Hollywood, Maryland 20636 USA
#
#       Voice: (301) 373-9600
#       EMail: cups-info@cups.org
#         WWW: http://www.cups.org
#

########################################################################
#                                                                      #
# This is the CUPS configuration file.  If you are familiar with       #
# Apache or any of the other popular web servers, we've followed the   #
# same format.  Any configuration variable used here has the same      #
# semantics as the corresponding variable in Apache.  If we need       #
# different functionality then a different name is used to avoid       #
# confusion...                                                         #
#                                                                      #
########################################################################

ServerName localhost

LogFilePerm 0600

# Recommended log size 1m
MaxLogSize 1m

PreserveJobHistory Off

PreserveJobFiles Off

AutoPurgeJobs Yes

DocumentRoot /usr/local/share/doc/cups

# Show general information in error_log.
# Default: 'LogLevel info'
# Change to 'LogLevel debug' for more detail
LogLevel info

Printcap /etc/printcap

User root

<Location />
# Allow shared printing and remote administration.
Order allow,deny
Allow @LOCAL
</Location>

#AuthType Digest
#Order Deny,Allow
#Allow From 127.0.0.1
#Allow From localhost

<Location /admin>
# Allow remote administration.
Order allow,deny
Allow @LOCAL
</Location>

<Location /printers>
Order Deny,Allow
Allow From 127.0.0.1
Allow From localhost
</Location>

# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow @LOCAL
BrowseAddress @LOCAL
BrowseProtocols cups
# Allow remote access
Port 631
« Last Edit: July 14, 2009, 02:22:50 AM by jpeters »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14823
Re: Newbie here - Cups problem
« Reply #22 on: July 13, 2009, 11:48:28 PM »
note: Juanito....thanks for all the extensions, inc the hplib libs. This works.  
note: I  think in the samba3.tc*.info file,  'samba.conf' should be 'smb.conf'     

/etc/cups/cpsd.conf
...

It should indeed be smb.conf - thanks, I'll correct that.

Looks like we're using the same keyboard - hplib, cpsd.conf...  :)