Running "sudo hp-setup" changed permission of other applications

Asked by Antonio Costantino

After I installed the HP LaserJet P1105 with "sudo hp-setup", KGpg and wicd were behaving strangely--not working.

Indeed, after many-many-many readings from forums and so, I discovered that owner and user of /home/antonio/.gnupg/pubring.gpg were changed to root, causing KGpg not to read my personal encryption key (meanwhile, a public key from HP was added).

Wicd was unable to start. Reading the log, I saw that /etc/wicd/wired-settings.conf was badly formatted. Moreover, manager-settings.conf, wired-settings.conf and wireless-settings.conf were all made readable only to root--making wicd requiring root password.

I know it can seem strange, but actually the same behavior was confirmed when I installed the same printer on my girlfriend's laptop (we're both using karmic fully updated--only security and recommended updates).

1) How is it possible for hp-setup to mess with other applications' permissions?

2) What's the right way to run hp-setup? Just as user, sudo hp-setup (recommended on hplip website) or kdesudo hp-setup?

3) How can I be sure it didn't mess with more difficult stuff to be discovered?

Thanks for your help,
Antonio

Question information

Language:
English Edit question
Status:
Solved
For:
HPLIP Edit question
Assignee:
No assignee Edit question
Solved by:
Mubeen Jukaku
Solved:
Last query:
Last reply:
Revision history for this message
Naga Samrat Chowdary, Narla (samrat-hplip) said :
#1

please run "hp-check -t" and post the output.

Thank you,
Naga Samrat Chowdary.

Revision history for this message
Antonio Costantino (anto-costantino) said :
#2

~$ hp-check -t

HP Linux Imaging and Printing System (ver. 3.9.8)
Dependency/Version Check Utility ver. 14.3

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Note: hp-check can be run in three modes:
1. Compile-time check mode (-c or --compile): Use this mode before compiling the HPLIP supplied tarball (.tar.gz or .run) to determine if the proper dependencies are
installed to successfully compile HPLIP.
2. Run-time check mode (-r or --run): Use this mode to determine if a distro supplied package (.deb, .rpm, etc) or an already built HPLIP supplied tarball has the
proper dependencies installed to successfully run.
3. Both compile- and run-time check mode (-b or --both) (Default): This mode will check both of the above cases (both compile- and run-time dependencies).

Saving output in log file: hp-check.log

Initializing. Please wait...

---------------
| SYSTEM INFO |
---------------

Basic system information:
Linux aleboco 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 01:26:53 UTC 2010 i686 GNU/Linux

Distribution:
ubuntu 9.10

Checking Python version...
OK, version 2.6.4 installed

Checking PyQt 4.x version...
OK, version 4.6 installed.

Checking for CUPS...
Status: scheduler is running
error: Version: (Not available. CUPS may not be installed or not running.)

Checking for dbus/python-dbus...
dbus daemon is running.
python-dbus version: 0.83.0

------------------------------------
| COMPILE AND RUNTIME DEPENDENCIES |
------------------------------------

note: To check for compile-time only dependencies, re-run hp-check with the -c parameter (ie, hp-check -c).
note: To check for run-time only dependencies, re-run hp-check with the -r parameter (ie, hp-check -r).

Checking for dependency: CUPS - Common Unix Printing System...
OK, found.

Checking for dependency: CUPS DDK - CUPS driver development kit...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
sudo aptitude install --assume-yes cupsddk cupsddk-drivers

Checking for dependency: CUPS devel- Common Unix Printing System development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libcupsys2-dev cupsys-bsd

Checking for dependency: CUPS image - CUPS image development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libcupsimage2-dev

Checking for dependency: DBus - Message bus system...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libdbus-1-dev

Checking for dependency: gcc - GNU Project C and C++ Compiler...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes build-essential

Checking for dependency: GhostScript - PostScript and PDF language interpreter and previewer...
OK, found.

Checking for dependency: libcrypto - OpenSSL cryptographic library...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes openssl

Checking for dependency: libjpeg - JPEG library...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libjpeg62-dev

Checking for dependency: libnetsnmp-devel - SNMP networking library development files...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libsnmp-dev

Checking for dependency: libpthread - POSIX threads library...
OK, found.

Checking for dependency: libtool - Library building support services...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libtool

Checking for dependency: libusb - USB library...
error: NOT FOUND! This is a REQUIRED dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libusb-dev

Checking for dependency: make - GNU make utility to maintain groups of programs...
OK, found.

Checking for dependency: PIL - Python Imaging Library (required for commandline scanning with hp-scan)...
OK, found.

Checking for dependency: PolicyKit - Administrative policy framework...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
sudo aptitude install --assume-yes policykit policykit-gnome

Checking for dependency: PyQt 4 DBus - DBus Support for PyQt4...
OK, found.

Checking for dependency: Python DBus - Python bindings for DBus...
OK, found.

Checking for dependency: Python devel - Python development files...
OK, found.

Checking for dependency: Python libnotify - Python bindings for the libnotify Desktop notifications...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
sudo aptitude install --assume-yes python-notify

Checking for dependency: Python XML libraries...
OK, found.

Checking for dependency: Python 2.3 or greater - Required for fax functionality...
OK, found.

Checking for dependency: Python 2.2 or greater - Python programming language...
OK, found.

Checking for dependency: Reportlab - PDF library for Python...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
sudo aptitude install --assume-yes python-reportlab

Checking for dependency: SANE - Scanning library...
OK, found.

Checking for dependency: SANE - Scanning library development files...
error: NOT FOUND! This is a REQUIRED/COMPILE TIME ONLY dependency. Please make sure that this dependency is installed before installing or running HPLIP.
To install this dependency, execute this command:
sudo aptitude install --assume-yes libsane-dev

Checking for dependency: scanimage - Shell scanning program...
OK, found.

Checking for dependency: xsane - Graphical scanner frontend for SANE...
warning: NOT FOUND! This is an OPTIONAL/RUNTIME ONLY dependency. Some HPLIP functionality may not function properly.
To install this dependency, execute this command:
sudo aptitude install --assume-yes xsane

----------------------
| HPLIP INSTALLATION |
----------------------

Currently installed HPLIP version...
HPLIP 3.9.8 currently installed in '/usr/share/hplip'.

Current contents of '/etc/hp/hplip.conf' file:
# hplip.conf. Generated from hplip.conf.in by configure.

[hplip]
version=3.9.8

[dirs]
home=/usr/share/hplip
run=/var/run
ppd=/usr/share/ppd/hplip/HP
ppdbase=/usr/share/ppd/hplip
doc=/usr/share/doc/hplip-doc/HTML
icon=no
cupsbackend=/usr/lib/cups/backend
cupsfilter=/usr/lib/cups/filter
drv=/usr/share/cups/drv

# Following values are determined at configure time and cannot be changed.
[configure]
network-build=yes
pp-build=yes
gui-build=yes
scanner-build=yes
fax-build=yes
dbus-build=yes
cups11-build=no
doc-build=yes
shadow-build=no
hpijs-install=yes
foomatic-drv-install=yes
foomatic-ppd-install=yes
foomatic-rip-hplip-install=no
hpcups-install=yes
cups-drv-install=yes
cups-ppd-install=no
internal-tag=3.9.8.36
restricted-build=no
ui-toolkit=qt4
qt3=no
qt4=yes
policy-kit=yes
hpijs-only-build=no
lite-build=no
udev-acl-rules=yes

Current contents of '/var/lib/hp/hplip.state' file:
[plugin]
eula = 1
installed = 1

Current contents of '~/.hplip/hplip.conf' file:
[installation]
date_time = 02/23/10 15:11:01
version = 3.9.8.36

--------------------------
| DISCOVERED USB DEVICES |
--------------------------

No devices found.

---------------------------------
| INSTALLED CUPS PRINTER QUEUES |
---------------------------------

HP_LaserJet_P1005
-----------------
Type: Printer
Device URI: hp:/usb/HP_LaserJet_P1005?serial=BC1FPZY
PPD: /etc/cups/ppd/HP_LaserJet_P1005.ppd
PPD Description: HP LaserJet p1005 hpijs, 3.9.8
Printer Unplugged or turned offrJet_P1005 disabled since Mon 22 Feb 2010 05:32:38 PM CET -

HP Linux Imaging and Printing System (ver. 3.9.8)
System Tray Status Service ver. 2.0

Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
This software comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to distribute it
under certain conditions. See COPYING file for more details.

Required plug-in status: Installed
error: Unable to communicate with device (code=12): hp:/usb/HP_LaserJet_P1005?serial=BC1FPZY
error: Device not found
error: Communication status: Failed

Officejet-7000-E809a
--------------------
Type: Printer
Device URI: hp:/usb/Officejet_7000_E809a?serial=MY9AO110RV05B8
PPD: /etc/cups/ppd/Officejet-7000-E809a.ppd
PPD Description: HP Officejet 7000 e809a hpijs, 3.9.8
Printer Unplugged or turned offet-7000-E809a disabled since Mon 15 Feb 2010 11:09:27 PM CET -
error: Unable to communicate with device (code=12): hp:/usb/Officejet_7000_E809a?serial=MY9AO110RV05B8
error: Device not found
error: Communication status: Failed

----------------------
| SANE CONFIGURATION |
----------------------

'hpaio' in '/etc/sane.d/dll.conf'...
'hpaio' in '/etc/sane.d/dll.d/hplip'...
OK, found. SANE backend 'hpaio' is properly set up.

Checking output of 'scanimage -L'...
device `v4l:/dev/video0' is a Noname Philips SPC 2050NC virtual device

---------------------
| PYTHON EXTENSIONS |
---------------------

Checking 'cupsext' CUPS extension...
OK, found.

Checking 'pcardext' Photocard extension...
OK, found.

Checking 'hpmudext' I/O extension...
OK, found.

Checking 'scanext' SANE scanning extension...
OK, found.

---------------
| USER GROUPS |
---------------

antonio adm dialout cdrom plugdev lpadmin netdev admin sambashare

-----------
| SUMMARY |
-----------

error: 18 errors and/or warnings.

Summary of needed commands to run to satisfy missing dependencies:
sudo aptitude install --assume-yes cupsddk cupsddk-drivers
sudo aptitude install --assume-yes libcupsys2-dev cupsys-bsd
sudo aptitude install --assume-yes libcupsimage2-dev
sudo aptitude install --assume-yes libdbus-1-dev
sudo aptitude install --assume-yes build-essential
sudo aptitude install --assume-yes openssl
sudo aptitude install --assume-yes libjpeg62-dev
sudo aptitude install --assume-yes libsnmp-dev
sudo aptitude install --assume-yes libtool
sudo aptitude install --assume-yes libusb-dev
sudo aptitude install --assume-yes policykit policykit-gnome
sudo aptitude install --assume-yes python-notify
sudo aptitude install --assume-yes python-reportlab
sudo aptitude install --assume-yes libsane-dev
sudo aptitude install --assume-yes xsane

Please refer to the installation instructions at:
http://hplip.sourceforge.net/install/index.html

Done.

Revision history for this message
Best Mubeen Jukaku (mubeen-jukaku) said :
#3

Please do not run hp-setup as root. You should run it as non-root.
Will have a look the permission changes when run as root.

-Mubeen

Revision history for this message
Antonio Costantino (anto-costantino) said :
#4

Thanks Mubeen Jukaku, that solved my question.

Revision history for this message
Antonio Costantino (anto-costantino) said :
#5

According to your answer, you should change the following page on the HP website:
http://hplipopensource.com/hplip-web/install/manual/hp_setup.html

I would really appreciate if you let me know if hp-setup may have changed other permissions of which I'm unaware.