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

[TECH DEBT] DeprecationWarning: 'spwd' is deprecated and slated for removal in Python 3.13 #64264

Open
j5k opened this issue May 9, 2023 · 1 comment

Comments

@j5k
Copy link

j5k commented May 9, 2023

Description of the tech debt to be addressed, include links and screenshots

/usr/lib/python3.11/site-packages/salt/modules/linux_shadow.py:21: DeprecationWarning: 'spwd' is deprecated and slated for removal in Python 3.13
  import spwd

Versions Report

Salt Version:
          Salt: 3006.1
 
Python Version:
        Python: 3.11.3 (main, Apr  5 2023, 15:52:25) [GCC 12.2.1 20230201]
 
Dependency Versions:
          cffi: 1.15.1
      cherrypy: Not Installed
      dateutil: 2.8.2
     docker-py: Not Installed
         gitdb: Not Installed
     gitpython: Not Installed
        Jinja2: 3.1.2
       libgit2: Not Installed
  looseversion: 1.1.2
      M2Crypto: 0.38.0
          Mako: 1.2.4
       msgpack: 1.0.4
  msgpack-pure: Not Installed
  mysql-python: Not Installed
     packaging: 23.0
     pycparser: 2.21
      pycrypto: Not Installed
  pycryptodome: 3.12.0
        pygit2: Not Installed
  python-gnupg: Not Installed
        PyYAML: 6.0
         PyZMQ: 25.0.2
        relenv: Not Installed
         smmap: Not Installed
       timelib: Not Installed
       Tornado: 4.5.3
           ZMQ: 4.3.4
 
System Versions:
          dist: Arch Linux | Kernel: 6.3.1 
        locale: utf-8
       machine: x86_64
       release: 6.3.1-arch1-1
        system: Linux
       version: Arch Linux | Kernel: 6.3.1

@OrangeDog
Copy link
Contributor

Also from PEP-594:

In general, it’s a bad idea to use spwd. It circumvents system security policies, does not use the PAM stack, and is only compatible with local user accounts, because it ignores NSS. The use of the spwd module for access control must be considered a security bug, as it bypasses PAM’s access control.

It is currently imported by salt.modules.linux_shadow and salt.modules.solaris_shadow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants