lpadmin authentication (password) problems

Robert Taylor rtaylor777 at gmail.com
Thu Feb 11 10:28:36 PST 2010


# CUPS version as indicated in Web page
Common UNIX Printing System 1.3.7
# Policy contains a line which indicates use of an md5 passwords file
AuthType Digest
# Policy contains the line...
SystemGroup sys
# The SystemGroup directive specifies the system administration group for System authentication.
# The passwd.md5 file (copied from another server CUPS v1.1.22rc1) contained
root:sys:3efb6e1796ac7b049d80d58ec638139d
# The root user was ABLE to authenticate through the Web page using this md5 file.
# The root user was NOT ABLE to authenticate using the lpadmin tool (using either the local root password or the one in the md5 file).
# root was added to the local sys and the lp groups and still could not authenticate with the passwd.md5 file using lpadmin.
# Solution:
# Create a new md5 passwords file (logged in as root)
rm /etc/cups/passwd.md5
lppasswd -a
# Creates a new file after prompting for a new password for root called:
/etc/cups/passwd.md5
# which contains:
cat /etc/cups/passwd.md5
root:lp:3efb6e1796ac7b049d80d58ec638139d
# Note that the previous passwd.md5 file (copied from another server) contained
root:sys:3efb6e1796ac7b049d80d58ec638139d
# root could not authenticate with the previous passwd.md5 file using lpadmin.
# With the new md5 file, root can authenticate both through the Web page and using the lpadmin tool.
# list the desired printer queue status
lpstat -a arm_r04039
# remove the indicated printer queue (prompts for the root password that is in the md5 file)
lpadmin -x arm_r04039
# create a new pinter (prompts for the root password that is in the md5 file)
/usr/sbin/lpadmin -h localhost -p arm_r04039 -D "HP LaserJet 1320n" -L "Plant Accountants Office" -E -v socket://r04039:9100 -P /usr/share/cups/model/manufacturer-PPDs/hp/HP_LaserJet_1320_Series.ppd.gz
# Summary:
# It occurs to me that the Web page understands the SystemGroup directive but the command line tools don't.
# I believe I have solved my issues but hopefully this message helps someone else avoid wasting so much time troubleshooting. :)
#
# P.S. I built a number of tools (Perl scripts) to automate exporting the printers and importing them on a new server.
# Additionally I built other scripts to synchronize changes to printers across servers (among other things).
# These likely will no longer function without using something like Expect. I provide some of the scripts
# from my website http://www.javacrypt.com. Feel free to implement anything you see as useful into your CUPS product.




More information about the cups mailing list