I am right now trying to connect to Nao robot to install an mqtt-client/listener. My goal is to install paho-mqtt using pip (following this tutorial using the command pip install paho-mqtt
. Thus, I need admin rights (root user), however, I cannot switch the user accounts using su
as I am receiving the error "Authentication failure" with error code 1.
here is what I tried:
If I call
pip install paho-mqtt
from the nao user, I only can retreive a read-only file and the installation fails.If I call
sudo pip install paho-mqtt
from the nao user, I get the error message: "Sorry, user nao is not allowed to execute '/usr/bin/pip install paho-mqtt' as root on nao."I tried
pip install paho-mqtt --user
, which theoretically worked but installed it to a /.local/ directory and it does not activate and actively listens to what is sent. (below are some screenshot on the outcomes of these tries)I tried
pip install paho-mqtt --root /usr/lib/python2.7/site-packages
but alo here I made problems with the user rights, that as user nao, the directory is read-only and not writable.I tried it when the robot was connected via an ethernet cable and without.
I tried connecting through raw (while connected with ethernet) and with telnet, but these connections were blocked.
Other things:
- robot and laptop are in the same network
- The root password is still the standard password
- I tried with the robot not connected to the internet and only through the ethernet
- I performed a factory reset
- I tried loading the files of the installation via file transfer to the robot from another nao robot.
- I tried to give the nao user admin rights - but also did not work without the root user
My current conclusion is, what also the documentation states, that the root user has been blocked from accessing through ssh connection. Now I am trying to find a different way of connecting to the root user in the robot and installing the paho-mqtt package. Anyone else had the problem or any ideas how to connect to the robot without using ssh??
I know that people managed to circumvent this and I would really appreciate the help and telling me how.
> nao [0] ~ $ su root
Password:
su: Authentication failure
> nao [err 1] ~ $ pip install paho-mqtt
Collecting paho-mqtt
Using cached https://files.pythonhosted.org/packages/f8/dd/4b75dcba025f8647bc9862ac17299e0d7d12d3beadbf026d8c8d74215c12/paho-mqtt-1.6.1.tar.gz
Installing collected packages: paho-mqtt
Running setup.py install for paho-mqtt ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-VYAcPd/paho-mqtt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5pl4_S/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/paho
copying src/paho/__init__.py -> build/lib/paho
creating build/lib/paho/mqtt
copying src/paho/mqtt/subscribeoptions.py -> build/lib/paho/mqtt
copying src/paho/mqtt/subscribe.py -> build/lib/paho/mqtt
copying src/paho/mqtt/reasoncodes.py -> build/lib/paho/mqtt
copying src/paho/mqtt/publish.py -> build/lib/paho/mqtt
copying src/paho/mqtt/properties.py -> build/lib/paho/mqtt
copying src/paho/mqtt/packettypes.py -> build/lib/paho/mqtt
copying src/paho/mqtt/matcher.py -> build/lib/paho/mqtt
copying src/paho/mqtt/client.py -> build/lib/paho/mqtt
copying src/paho/mqtt/__init__.py -> build/lib/paho/mqtt
running egg_info
writing requirements to src/paho_mqtt.egg-info/requires.txt
writing src/paho_mqtt.egg-info/PKG-INFO
writing top-level names to src/paho_mqtt.egg-info/top_level.txt
writing dependency_links to src/paho_mqtt.egg-info/dependency_links.txt
reading manifest file 'src/paho_mqtt.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'epl-v10'
writing manifest file 'src/paho_mqtt.egg-info/SOURCES.txt'
running install_lib
creating /usr/lib/python2.7/site-packages/paho
error: could not create '/usr/lib/python2.7/site-packages/paho': Read-only file system
----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-VYAcPd/paho-mqtt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-5pl4_S/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-VYAcPd/paho-mqtt/
> nao [err 1] ~ $ pip list
Package Version
--------------- -----------
asn1crypto 0.24.0
backports-abc 0.4
catkin-pkg 0.2.10
certifi 2018.11.29
cffi 1.11.5
chardet 3.0.4
cryptography 2.3
enum34 1.1.6
fail2ban 0.10.3.fix1
idna 2.7
ipaddress 1.0.22
ndg-httpsclient 0.5.1
numpy 1.14.5
pil-compat 1.0.0
Pillow 3.1.1
pip 18.0
ply 3.11
pyasn1 0.4.4
pycparser 2.18
pycryptodome 3.4.11
pygobject 3.28.3
pyinotify 0.9.6
pyOpenSSL 18.0.0
pyserial 3.4
PySocks 1.6.8
python-dateutil 2.7.3
PyYAML 3.13
requests 2.19.1
setuptools 40.0.0
simplejson 3.16.0
singledispatch 3.4.0.3
six 1.11.0
systemd-python 234
TornadIO2 0.0.3
tornado 4.5.3
urllib3 1.23
vobject 0.9.6.1
> nao [0] ~ $ sudo pip install paho-mqtt
Password:
Sorry, user nao is not allowed to execute '/usr/bin/pip install paho-mqtt' as root on nao.
> nao [err 1] ~ $ sudo pip install paho-mqtt --root /usr/lib/python2.7/site-packages
Password:
Sorry, user nao is not allowed to execute '/usr/bin/pip install paho-mqtt --root /usr/lib/python2.7/site-packages' as root on nao.
On the most recent versions of the NAOqi OS, the root access is not allowed. Please try with
--user
or within avenv
.