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

Fix unexpected keyword argument 'crypt_id' on FreeBSD 14.1 #1955

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

kro-cat
Copy link

@kro-cat kro-cat commented Aug 15, 2024

fix(distroutils): encode cmd_input argument for ext_utils.run_send_stdin()

The method ext_utils.run_send_stdin() (in extensionutils.py) requires
the second argument, cmd_input, to be a bytes object, not a string
object. This is due to the usage of: subprocess.Popen().communicate().
Encode the password as utf-8 when passing to ext_utils.run_send_stdin().

fix(distroutils): add **kwargs to FreeBSDDistro.chpasswd()

When operating FreeBSD, the argument crypt_id is passed to an
overridden method chpasswd() in the FreeBSDDistro class. The definition
of this method does not contain an argument for 'crypt_id' or
'salt_len'. To address this issue, add **kwargs to the definition of
chpasswd() in the FreeBSDDistro class.

Commit to master (Aug 23, 3034):
This was not related to the issue, but it's inclusion is appropriate to the FreeBSDDistro class.

fix(distroutils): use /etc/pw.conf to discern accounting information.

/etc/user.defs is the shadow configuration file. FreeBSD user management
uses the pw utility.

fixes: #1839

When operating FreeBSD, the argument crypt_id is passed to an
overridden method chpasswd() in the FreeBSDDistro class. The definition
of this method does not contain an argument for 'crypt_id' or
'salt_len'. To address this issue, add **kwargs to the definition of
chpasswd() in the FreeBSDDistro class.
…din()

The method ext_utils.run_send_stdin() (in extensionutils.py) requires
the second argument, cmd_input, to be a bytes object, not a string
object. This is due to the usage of: subprocess.Popen().communicate().
Encode the password as utf-8 when passing to ext_utils.run_send_stdin().
@kro-cat kro-cat requested review from D1v38om83r, nkuchta and a team as code owners August 15, 2024 19:35
@kro-cat
Copy link
Author

kro-cat commented Aug 23, 2024

@microsoft-github-policy-service agree

/etc/user.defs is the shadow configuration file. FreeBSD user management
uses the pw utility.
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

Successfully merging this pull request may close these issues.

Changing password using Azure Portal does not work in FreeBSD
1 participant