Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Saturday, 5 January 2019 1:49:47 PM EST Brian Potkin wrote: > On Fri 04 Jan 2019 at 11:58:53 -0500, Brendon Higgins wrote: > > hp-plugin, too. Do you have your upstream bug number handy? I'd like to > > follow progress (if any). > > It is referenced as a duplicate in the forwarded bug report. Ah, yes. Apologies, apparently I was blind that day. XD > Brendon - it is always useful to know which device make and model is > being used. In my case it's an HP Color LaserJet Pro MFP M277dw. Best, Brendon
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Fri 04 Jan 2019 at 11:58:53 -0500, Brendon Higgins wrote: > On Monday, 29 January 2018 2:46:40 PM EST Brian Potkin wrote: > > On Monday, 29 January 2018 6:03:19 PM EST Reinhard John wrote: [Snipped, but due to be responded to at a later date] > > But as Brian pointed out, this is just a workaround, not a solution. > > hp-doctor should be able to accept both types of verification. This is > > intended in the file /usr/share/hplip/doctor.py (line 102 to 122) and it > > doesn´t work, at least not with debian. And this is undoubtedly a bug. > > We will see whether the hplip developers will react to my bug report there. > > hp-plugin, too. Do you have your upstream bug number handy? I'd like to > follow > progress (if any). It is referenced as a duplicate in the forwarded bug report. Brendon - it is always useful to know which device make and model is being used. Regards, Brian.
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Monday, 29 January 2018 2:46:40 PM EST Brian Potkin wrote: > Without any change to password.py the plugin will install with > > sudo hp-plugin -i > > So what was chrysn referring to? Perhaps my case can serve as an illustrative example: Every time hplip package updates, the next time I go to scan something with my MFC (using gscan2pdf, say), I get a prompt that I need to download the plugin. (Is that itself a bug?) Of course it fails because my system has no root password, only sudo. In principle, the edit-password.py workaround does work, except that the package update also typically means password.py gets overwritten. And the sudo hp-plugin -i approach has issues: * "warning: It is not recommended to run 'hp-plugin' in a root mode." * "error: Unable to recieve key from keyserver" It's a bit frustrating. I have to remember to either edit password.py or run sudo hp-plugin -i every time the package updates. (Come to think of it, an install hook would be nice...) On Monday, 29 January 2018 6:03:19 PM EST Reinhard John wrote: > But as Brian pointed out, this is just a workaround, not a solution. > hp-doctor should be able to accept both types of verification. This is > intended in the file /usr/share/hplip/doctor.py (line 102 to 122) and it > doesn´t work, at least not with debian. And this is undoubtedly a bug. > We will see whether the hplip developers will react to my bug report there. hp-plugin, too. Do you have your upstream bug number handy? I'd like to follow progress (if any). Thanks, Brendon
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
Am 29.01.2018 um 20:46 schrieb Brian Potkin: That worked but you cannot expect a user to go through all of this. Devising a solution still lies in the hands of the hplip team. Whether they will implement one is another matter. I tested the complete workaround and it really works! Thank you for your analysis, Brian! I learned a lot about the background processes of hplip. To sum up my own experiences: It is not crucial to change the debian version to 8.6. hp-doctor will automatically fall back to version 8.6: Checking for Deprecated items error: This distro (i.e debian 9.3) is either deprecated or not yet supported. The diagnosis is limited on unsupported platforms. Do you want to continue?(y=yes*, n=no):y Checking for Dependencies warning: 2-9.3 version is not supported. Using 2-8.6 versions dependencies to verify and install... It is necessary to replace 'su' in line 35 with 'sudo' in password.py. And to replace "su -c" and "su_sudo" with "sudo" in the lines 4118 to 4122 in the file distros.dat. Then the doctor is able to heal the missing dependencies. (Irrespective of the question how crucial these dependencies really are! I also wonder at the listing.) But as Brian pointed out, this is just a workaround, not a solution. hp-doctor should be able to accept both types of verification. This is intended in the file /usr/share/hplip/doctor.py (line 102 to 122) and it doesn´t work, at least not with debian. And this is undoubtedly a bug. We will see whether the hplip developers will react to my bug report there. Regards Reinhard
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
severity 825383 minor thanks On Mon 29 Jan 2018 at 14:41:50 +, Brian Potkin wrote: > On Sun 28 Jan 2018 at 17:40:46 +, Brian Potkin wrote: > > > On Sun 28 Jan 2018 at 17:11:49 +0100, Reinhard John wrote: > > > > > I removed two dependencies to test the proposed workaround. Besides: The > > > correct path of the file is /usr/share/hplip/base/password.py. > > > Now the hp-doctor asked for the sudoer´s password. But: the installation > > > of > > > the missing dependencies failed. > > > > > > > ENTER SUDO PASSWORD > > > > --- > > > > Please enter the sudoer (reinhard)'s password: > > > > Do you want to update repository and Install missing/incompatible > > > > packages. (a=install all*, c=custom_install, s=skip):a > > > > Updating repository > > > > --- > > > > Installing Missing/Incompatible packages > > > > > > > > cmd =libssl-dev > > > > error: Failed to install 'libssl-dev' package, please install manually. > > > > cmd =libsane-dev > > > > error: Failed to install 'libsane-dev' package, please install manually. > > > > > > Do you think this error results of a follow-up configuration problem in > > > another file? > > > > > > I will send a bug report to the hplip developers. If there are any > > > solutions > > > I will post them here. > > > > Success, then; you do not need a root password. Thanks for the testing > > and the path correction. > > > > I can see no reason why you would need those two files to print or scan. > > Forget about them. > > My response was less than adequate; apologies. I had actually tested > hp-plugin after changing su to sudo in password.py. It worked but you > caused me to wonder why. hp-plugin downloads and installs a plugin. > Downloading requires no root privileges but installing does, and the > privileges have already been gained via sudo. Without any change to password.py the plugin will install with sudo hp-plugin -i So what was chrysn referring to? > hp-doctor uses/usr/share/hplip/installer/distros.dat. The [debian] > section updates and downloads packages with su -c. I changed all these > and su_sudo to sudo. I'm using a 9.3 stretch version and also changed > /etc/issue and /etc/debian_version to 9.1, which is the last entry on > the versions line. The last entry is 8.6 on the versions line and only /etc/debian_version has to be altered to 8.6. > That worked but you cannot expect a user to go through all of this. > Devising a solution still lies in the hands of the hplip team. Whether > they will implement one is another matter. If you are beginning to think I am not very used to the sudo command you would be quite right. :) As far as I can make out, a print queue and a plugin can be set up with sudo. hp-doctor appears to be the only utility affected by the lack of a root password on the system. I wouldn't rate its importance on the same level as hp-setup and hp-plugin. hp-check appears to duplicate hp-doctor's diagnostic ability and the Missing Required Dependencies lists *-dev programs, which are not needed to print and scan. Others programs listed as missing are known to be on a Debian system; libc6, for example. And why cups-bsd is required is beyond me. Reducing the severity accordingly. Cheers, Brian.
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Sun 28 Jan 2018 at 17:40:46 +, Brian Potkin wrote: > On Sun 28 Jan 2018 at 17:11:49 +0100, Reinhard John wrote: > > > I removed two dependencies to test the proposed workaround. Besides: The > > correct path of the file is /usr/share/hplip/base/password.py. > > Now the hp-doctor asked for the sudoer´s password. But: the installation of > > the missing dependencies failed. > > > > > ENTER SUDO PASSWORD > > > --- > > > Please enter the sudoer (reinhard)'s password: > > > Do you want to update repository and Install missing/incompatible > > > packages. (a=install all*, c=custom_install, s=skip):a > > > Updating repository > > > --- > > > Installing Missing/Incompatible packages > > > > > > cmd =libssl-dev > > > error: Failed to install 'libssl-dev' package, please install manually. > > > cmd =libsane-dev > > > error: Failed to install 'libsane-dev' package, please install manually. > > > > Do you think this error results of a follow-up configuration problem in > > another file? > > > > I will send a bug report to the hplip developers. If there are any solutions > > I will post them here. > > Success, then; you do not need a root password. Thanks for the testing > and the path correction. > > I can see no reason why you would need those two files to print or scan. > Forget about them. My response was less than adequate; apologies. I had actually tested hp-plugin after changing su to sudo in password.py. It worked but you caused me to wonder why. hp-plugin downloads and installs a plugin. Downloading requires no root privileges but installing does, and the privileges have already been gained via sudo. hp-doctor uses/usr/share/hplip/installer/distros.dat. The [debian] section updates and downloads packages with su -c. I changed all these and su_sudo to sudo. I'm using a 9.3 stretch version and also changed /etc/issue and /etc/debian_version to 9.1, which is the last entry on the versions line. That worked but you cannot expect a user to go through all of this. Devising a solution still lies in the hands of the hplip team. Whether they will implement one is another matter. Cheers, Brian.
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Sun 28 Jan 2018 at 17:11:49 +0100, Reinhard John wrote: > On Sat, 27 Jan 2018 16:15:55 + Brian Potkin> wrote: > > On Sat 27 Jan 2018 at 16:09:32 +, Brian Potkin wrote: > > > > > Look for "AUTH_TYPES" and change > > > > > > 'debian':'su' > > > > > > to > > > > > > 'debian':'sudo' > > > > I forgot to mention: reports of success are welcome. > > > > Regards, > > > > Brian. > > > > > > I removed two dependencies to test the proposed workaround. Besides: The > correct path of the file is /usr/share/hplip/base/password.py. > Now the hp-doctor asked for the sudoer´s password. But: the installation of > the missing dependencies failed. > > > ENTER SUDO PASSWORD > > --- > > Please enter the sudoer (reinhard)'s password: > > Do you want to update repository and Install missing/incompatible > > packages. (a=install all*, c=custom_install, s=skip):a > > Updating repository > > --- > > Installing Missing/Incompatible packages > > > > cmd =libssl-dev > > error: Failed to install 'libssl-dev' package, please install manually. > > cmd =libsane-dev > > error: Failed to install 'libsane-dev' package, please install manually. > > Do you think this error results of a follow-up configuration problem in > another file? > > I will send a bug report to the hplip developers. If there are any solutions > I will post them here. Success, then; you do not need a root password. Thanks for the testing and the path correction. I can see no reason why you would need those two files to print or scan. Forget about them. Cheers, Brian.
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Sat, 27 Jan 2018 16:15:55 + Brian Potkinwrote: > On Sat 27 Jan 2018 at 16:09:32 +, Brian Potkin wrote: > > > Look for "AUTH_TYPES" and change > > > > 'debian':'su' > > > > to > > > > 'debian':'sudo' > > I forgot to mention: reports of success are welcome. > > Regards, > > Brian. > > I removed two dependencies to test the proposed workaround. Besides: The correct path of the file is /usr/share/hplip/base/password.py. Now the hp-doctor asked for the sudoer´s password. But: the installation of the missing dependencies failed. ENTER SUDO PASSWORD --- Please enter the sudoer (reinhard)'s password: Do you want to update repository and Install missing/incompatible packages. (a=install all*, c=custom_install, s=skip):a Updating repository --- Installing Missing/Incompatible packages cmd =libssl-dev error: Failed to install 'libssl-dev' package, please install manually. cmd =libsane-dev error: Failed to install 'libsane-dev' package, please install manually. Do you think this error results of a follow-up configuration problem in another file? I will send a bug report to the hplip developers. If there are any solutions I will post them here. Regards Reinhard
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Sat 27 Jan 2018 at 16:09:32 +, Brian Potkin wrote: > Look for "AUTH_TYPES" and change > > 'debian':'su' > > to > > 'debian':'sudo' I forgot to mention: reports of success are welcome. Regards, Brian.
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
On Thu 26 May 2016 at 10:37:58 -0400, Mike wrote: > Package: hplip-data > Version: 3.14.6-1 > Severity: important > File: /usr/share/hplip/doctor.py > > Dear Maintainer, > > *** Reporter, please consider answering these questions, where appropriate *** > >* What led up to the situation? > I tried to install an HP Printer for use on Debian. > >* What exactly did you do (or not do) that was effective (or > ineffective)? > I ran 'hp-doctor' from the command line. hp-doctor asks for a "root > password" to complete its task. But debian was installed with Sudo > rights and a root account was never created (i.e., there technically > is no root password). hp-doctor will not accept the Sudo password and > keeps asking for a root password. > >* What was the outcome of this action? > It is impossible to run hp-doctor and therefore is impossible to > install a printer without technical know-how. > >* What outcome did you expect instead? > I expected hp-doctor to run successfully with the Sudo password (as > every other program on the computer does). This issue is one for hplip's developers, not for Debian's maintainers. As an interim solution open /usr/share/hplip/password.py in an editor. Look for "AUTH_TYPES" and change 'debian':'su' to 'debian':'sudo' I'll probably push this upstream later today or tomorrow. Regards, Brian.
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
Package: hplip Version: 3.16.11+repack0-3 Followup-For: Bug #825383 Dear Maintainer, I can confirm that this bug is still existent in Debian 9. I understand that there will be not so many users affected by this bug since only a minority will configure their Debian system with sudo instead of a root account. But I think Debian stable should be able to handle a configuration with sudo. I am no programmer, but if I can contribute somehow in solving this problem, let me know. Greetings Reinhard -- Package-specific info: -- System Information: Debian Release: 9.3 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages hplip depends on: ii adduser3.115 ii coreutils 8.26-3 ii cups 2.2.1-8 ii hplip-data 3.16.11+repack0-3 ii libc6 2.24-11+deb9u1 ii libcups2 2.2.1-8 ii libdbus-1-31.10.24-0+deb9u1 ii libhpmud0 3.16.11+repack0-3 ii libsane1.0.25-4.1 ii libsane-hpaio 3.16.11+repack0-3 ii libsnmp30 5.7.3+dfsg-1.7 ii libusb-1.0-0 2:1.0.21-1 ii lsb-base 9.20161125 ii policykit-10.105-18 ii printer-driver-hpcups 3.16.11+repack0-3 ii python33.5.3-1 ii python3-dbus 1.2.4-1+b1 ii python3-gi 3.22.0-2 ii python3-pexpect4.2.1-1 ii python3-pil4.0.0-4 ii python3-reportlab 3.3.0-2 ii wget 1.18-5+deb9u1 Versions of packages hplip recommends: ii avahi-daemon 0.6.32-2 ii printer-driver-postscript-hp 3.16.11+repack0-3 ii sane-utils1.0.25-4.1 Versions of packages hplip suggests: pn hplip-doc ii hplip-gui 3.16.11+repack0-3 ii python3-notify20.3-3 pn system-config-printer -- no debconf information
Bug#825383: /usr/share/hplip/doctor.py: hp-doctor will not accept sudo password and there is no root account
Package: hplip-data Version: 3.14.6-1 Severity: important File: /usr/share/hplip/doctor.py Dear Maintainer, *** Reporter, please consider answering these questions, where appropriate *** * What led up to the situation? I tried to install an HP Printer for use on Debian. * What exactly did you do (or not do) that was effective (or ineffective)? I ran 'hp-doctor' from the command line. hp-doctor asks for a "root password" to complete its task. But debian was installed with Sudo rights and a root account was never created (i.e., there technically is no root password). hp-doctor will not accept the Sudo password and keeps asking for a root password. * What was the outcome of this action? It is impossible to run hp-doctor and therefore is impossible to install a printer without technical know-how. * What outcome did you expect instead? I expected hp-doctor to run successfully with the Sudo password (as every other program on the computer does). *** End of the template - remove these template lines *** -- System Information: Debian Release: 8.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages hplip-data depends on: pn python:any ii xz-utils5.1.1alpha+20120614-2+b3 hplip-data recommends no packages. Versions of packages hplip-data suggests: ii hplip 3.14.6-1+b2 -- no debconf information