Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prompted to enter password for keyring #19

Open
p1r473 opened this issue Sep 1, 2021 · 0 comments
Open

Prompted to enter password for keyring #19

p1r473 opened this issue Sep 1, 2021 · 0 comments

Comments

@p1r473
Copy link
Contributor

p1r473 commented Sep 1, 2021

Failing to run both manually and through cron due to being prompted for keyring password every time

Running it manually asks for the keyring password:

/usr/bin/python3 /usr/local/bin/outage_detector --run scheduled --notify notification
Please enter password for encrypted keyring:

error.txt showing the cronjob failing:

/usr/lib/python3.7/getpass.py:91: GetPassWarning: Can not control echo on the terminal.
  passwd = fallback_getpass(prompt, stream)
Warning: Password input may be echoed.
Please enter password for encrypted keyring: Traceback (most recent call last):
  File "/usr/lib/python3.7/getpass.py", line 69, in unix_getpass
    old = termios.tcgetattr(fd)     # a copy to save
termios.error: (25, 'Inappropriate ioctl for device')

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/outage_detector", line 33, in <module>
    sys.exit(load_entry_point('Outage-Detector==1.1.2', 'console_scripts', 'outage_detector')())
  File "/usr/local/lib/python3.7/dist-packages/Outage_Detector-1.1.2-py3.7.egg/outagedetector/__main__.py", line 20, in main
  File "/usr/local/lib/python3.7/dist-packages/Outage_Detector-1.1.2-py3.7.egg/outagedetector/outage_detector.py", line 71, in check_power_and_internet
  File "/usr/local/lib/python3.7/dist-packages/keyring-20.0.1-py3.7.egg/keyring/core.py", line 56, in get_password
    return _keyring_backend.get_password(service_name, username)
  File "/usr/local/lib/python3.7/dist-packages/keyring-20.0.1-py3.7.egg/keyring/backends/chainer.py", line 43, in get_password
    password = keyring.get_password(service, username)
  File "/usr/local/lib/python3.7/dist-packages/keyrings.alt-3.2.0-py3.7.egg/keyrings/alt/file_base.py", line 118, in get_password
    password = self.decrypt(password_encrypted, assoc).decode('utf-8')
  File "/usr/local/lib/python3.7/dist-packages/keyrings.alt-3.2.0-py3.7.egg/keyrings/alt/file.py", line 216, in decrypt
    cipher = self._create_cipher(self.keyring_key, data['salt'], data['IV'])
  File "/usr/local/lib/python3.7/dist-packages/keyring-20.0.1-py3.7.egg/keyring/util/properties.py", line 59, in __get__
    return self.fget(obj)
  File "/usr/local/lib/python3.7/dist-packages/keyrings.alt-3.2.0-py3.7.egg/keyrings/alt/file.py", line 94, in keyring_key
    self._unlock()
  File "/usr/local/lib/python3.7/dist-packages/keyrings.alt-3.2.0-py3.7.egg/keyrings/alt/file.py", line 179, in _unlock
    'Please enter password for encrypted keyring: '
  File "/usr/lib/python3.7/getpass.py", line 91, in unix_getpass
    passwd = fallback_getpass(prompt, stream)
  File "/usr/lib/python3.7/getpass.py", line 126, in fallback_getpass
    return _raw_input(prompt, stream)
  File "/usr/lib/python3.7/getpass.py", line 148, in _raw_input
    raise EOFError
EOFError
@p1r473 p1r473 changed the title Cron job not entering password into keyring Also prompted to enter password for keyring Sep 1, 2021
@p1r473 p1r473 changed the title Also prompted to enter password for keyring Prompted to enter password for keyring Sep 10, 2021
@p1r473 p1r473 mentioned this issue Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant