7

I am running in my shell:

./hplip-3.18.7.run

Then it wants me to enter the root password, but does not accepting it!

enter image description here

Anybody know what this is?

If I run the script with sudo sudo ./hplip-3.18.7.run , then it tells me at some step in the installation process: warning: hp-systray should not be run as root/superuser.

I am using Ubuntu 18.04:

NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

This what the installer outputs at the beginning:

enter image description here

sunwarr10r
  • 1,395
  • 4
  • 16
  • 33
  • Ubuntu has no root password. Did you try `sudo ./hplip-3.18.7.run` ? – pLumo Aug 30 '18 at 12:27
  • 2
    The I get `warning: hp-systray should not be run as root/superuser` – sunwarr10r Aug 30 '18 at 12:28
  • 1
    Any reason to not use the version from the repo? `sudo apt-get install hplip-gui`. [See this](https://askubuntu.com/questions/888770/hplip-downloaded-from-hp-wont-run?rq=1). – pLumo Aug 30 '18 at 12:29
  • How can I uninstall the one I have installed? – sunwarr10r Aug 30 '18 at 12:29
  • 2
    Possible duplicate of [How to install latest HPLIP on my Ubuntu to support my HP printer and/or scanner?](https://askubuntu.com/questions/1056077/how-to-install-latest-hplip-on-my-ubuntu-to-support-my-hp-printer-and-or-scanner) Also please make sure that you really need binary version from HP site. It is very likely that your printer is supported in `hplip-` packages from repository. – N0rbert Aug 30 '18 at 13:17
  • @RoVo Have installed it now from the repo, it doesn't start :-/ this is so annoying :-/ – sunwarr10r Aug 30 '18 at 13:42
  • Which version of Ubuntu is this? – George Udosen Aug 30 '18 at 14:36
  • It is version 18.04. – sunwarr10r Aug 30 '18 at 14:49
  • Please add output of `cat /etc/os-release` to the question. And please remove comments [on other topic](https://askubuntu.com/a/1056078/66509) (it is not related to your original problem with permissions). – N0rbert Aug 30 '18 at 15:20
  • OK, but all comments are already removed. thanks for the help – sunwarr10r Aug 30 '18 at 15:37
  • I asked about /etc/os-release because of the fact that hplip-installer have hardcoded `sudo` auth mechanism for Ubuntu (and even Mint). Please run installer again and insert text starting with "Distro appears to be" to the question. I can't guess why it tries to use `su` instead of `sudo`. Is it possible that you are running Ubuntu-derivative (ElementaryOS or something)? – N0rbert Aug 30 '18 at 15:41
  • Please add output of the following commands to the question: `python -c "import platform;print platform.dist()[0]"`, `lsb_release -i | cut -f 2`, `cat /etc/issue | awk '{print $1}' | head -n 1`. – N0rbert Aug 30 '18 at 15:52
  • Both command lines output `Ubuntu` – sunwarr10r Aug 30 '18 at 15:54
  • Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/82476/discussion-between-n0rbert-and-saitam). – N0rbert Aug 30 '18 at 15:56

3 Answers3

8

Analysis

From hplip source-code we can learn the following about auth. Auth is performed in base/password.py file.

The main AUTH_TYPES are for:

  • Debian - su
  • Ubuntu - sudo

During chat session and in comments we have discovered interesting moments:

  • the first check is made python platform module. On Ubuntu it should return "Ubuntu".

  • second distro check - lsb_release -i | cut -f 2 returns "Ubuntu"

  • third distro check - cat /etc/issue | awk '{print $1}' | head -n returns "Ubuntu".

But OP has installed Anaconda in home folder, and added this directory to the path. And what is interesting - in such case python -c "import platform;print platform.dist()[0]" returns "Debian" (!!!) on distro check. So installer tried to use su. But root account is disabled on Ubuntu by default, so problem arises ("Please enter the root/superuser password:" instead of "Please enter the sudoer (%s)'s password: ").

Conclusion

Always check your $PATH variable for Python versions.
Many software in Ubuntu depend on Python. APT does not know about Anaconda, so system may have unpredictable behaviour with third-party pythons and pips. I can recommend to exclude third-party pythons from $PATH variable.

Then binary hplip installer should work normally. And you can follow my instruction then.

N0rbert
  • 97,162
  • 34
  • 239
  • 423
  • 1
    If your issue is with Anaconda, as @n0rbert suggested, you can just temporarily turn conda off with 'conda deactivate' – Paparazio Mar 09 '21 at 03:16
  • `conda deactivate` is the most straight-forward way to solve this issue – Matias Andina Apr 19 '21 at 14:43
  • but still issues with pyqt5, see [here](https://askubuntu.com/questions/1246680/some-python-packages-could-not-be-installed-during-hplip-3-20-5-installing-on-ub) – Matias Andina Apr 19 '21 at 14:49
1

I had the same issue. I am from the Czech Republic and my password contained some special characters which are not available in the English alphabet (ě, š). What fixed the issue was to temporarily change the password so that it does not contain these characters. After that, the password was finally accepted and the rest of the installation finished without any other issues.

Ondra
  • 11
  • 1
0

I solved this issue differently As an Ubuntu user (no root password)

me@mycomputer:~$ sudo -s
[sudo] password for me:
root@computer:~# 

After this, the installer didn't ask me for any password.

Byte Commander
  • 105,631
  • 46
  • 284
  • 425
Fuad Fouad
  • 123
  • 6
  • 1
    The installer tells me "You are running the installer as root. It is highly recommended that you run the installer as error: a regular (non-root) user. Do you still wish to continue?". Did you get the same? – Silicomancer Jun 24 '20 at 14:38
  • no, because I tried to do it as a sudo user and not a root user. https://unix.stackexchange.com/questions/291454/difference-between-sudo-user-and-root-user – Fuad Fouad Jun 25 '20 at 13:10